I know that gf
will use includeexpr
to modify the name and make another attempt to find said file. However I need to make two modifications to the term being used to seed the search (i.e., the text under the cursor when gf
is pressed.
The Chef DSL on top of Ruby lets you include recipes from the same cookbook using this statement:
include_recipe ::foo
The underlying file is called foo.rb
. So I need to strip off the leading colons, and tack on a .rb
. One is easy, but I'm not sure how to do both.
:set includeexpr=substitute(v.fname,'::','','')
will remove the leading colons. How do I add the .rb
?