Index ¦ Archives ¦ Atom

VIM Wizardry

So, I just recently re-discovered the vim command gf. The idea is that it automatically opens the file name that is under the cursor. This works until the file starts at the root level. In XQuery "root" is the base directory of your XQuery app server. So, gf doesn't work. The work-around is to remove the leading / and try gf again with that new file name. This works well.

PUT CODE HERE TO DO IT WITH REMAP substitute(expand('<cfile>'), "^[\\\\\\/]", "", "")

Another feature one might want is to search all sub-directories. To do this just alter your path: :set path+=./**.

© Steve Spigarelli. Built using Pelican. Theme by Giulio Fidente on github.