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
Post a Comment