Tip 57: Jump to the Filename Under the Cursor
Return to the top: <<Practical Vim>>
Vim treats filenames in our document as a kind of hyperlink. When configured properly, we can use the gf
command to go to the filename under the cursor.
References
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h gf
Specify a File Extension
References
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h suffixesadd
Specify the Directories to Look Inside
References
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h path
Inspect the value of the path:
:set path?