linux - Why does gf does not work for vim but ctrl+] works? -


i have file e.g. a.pl has method call:

add_location(@crew);

the actual definition in same file. if do: ctrl + ] cursor jumps definition. if do: gf get:
e447: can't find file "add_location" in path

if :pwd current working directory. path complaint about? function definition in same file.

the <c-]> command goes tag under cursor; seem have valid tags database (i.e. have run ctags before) , there tag named add_location.

the gf command goes file under cursor, i.e. treats add_location filename (possibly appending suffix .pl (see :help 'suffixesadd'), , searches in directories specified 'path'.

so, basically, you're using wrong command job; <c-]> right. note if location in same file, use * command go next matches; useful when have no tags database , therefore cannot use more powerful <c-]> command.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -