Skip to main content
edited tags
Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274
Source Link
bronzehedwick
  • 835
  • 1
  • 7
  • 14

Expanding variables in path

Background

I work a lot in the twig template language, and make use of path variables. For example, an include might look like

{% include "@my_path_var/my_folder/my-template.twig" %}

The @my_path_var is shorthand for a full filesystem path, e.g. /Users/me/Sites/project/twig/patterns/.

Desire

I would like to be able to follow these paths using gf.

Question

Is there a way to enable this behavior, using Vim's native path variables, or some other Vim configuration? Or would this need to be a plugin?

Thanks.