Skip to main content
1 of 2
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.

bronzehedwick
  • 835
  • 1
  • 7
  • 14