How to jump to a vimscript file's function definition?
(I'm having a hard time searching for this particular functionality, then getting results for using ctags in Vim, and not sure how to phrase that properly...)
I usually use the search in file functionality of Vim to find the definition of the function.
To find the definition of
MyFunction I would run the command:
:vim "^fun.* MyFunction"
Or using the Ack plugin:
:Ack! "^fun.* MyFunction"
To use tags you have to be sure first that the
tags files has been generated in the current directory for the project in which you are searching the function definition.
You can achieve that by running
Or if you prefer skip the console output to check the result
:silent! !ctags *.vim
Or by making sure a plugin such as gutentags running it in the background for you.
With this ensured you can go to the definition using the command: