gotofile : gf replacement by using the tags file
| script karma |
Rating -1/1,
Downloaded by 719 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Nathan Huizinga |
| |
| script type |
| utility |
| |
| description |
This script defines a new command 'GotoFile', which resembles the normal
'gf' function, but uses a standard tags file generated by ctags for
looking up the file name under the cursor.
You need to generate a standard tags file (with ctags) for this script to work.
Add the following ctags option for generating filename tags: --extra=+f
For example: ctags -R --extra=+f
Add the following mapping to your .vimrc (or _vimrc) to replace the
normal 'gf' behavior by the GotoFile command:
nmap <silent> gf :GotoFile<CR>
I wrote this script mainly for having an alternative for setting the
path and using 'gf'. While using completion all header files within
the path are also searched, which causes a major performance hit for
large projects (at least for me). So this script allows using the
'gf' feature without setting the path. Other suggestions are welcome!
|
| |
| install details |
Just place this script in your plugin directory.
Generate the tags file with ctags.
Make sure that your tags file can be found by vim. See :help 'tags'
Install the latest version of genutils (vimscript #197).
|
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.208
|