Jump to function definition in vim, without using plugins or ctags
is it possible to jump to function definitions in vim without using plugins or ctags?
and if so, 开发者_开发百科how?
a related question:
Jump to function definition in vimWere it possible, why would anybody write a plug-in or use ctags
?
So let us assume that it is not.
You can use # and * to search backwards and forwards (respectively) for the word under your cursor in the current buffer.
Or you can use :vimgrep
and CTRL-R CTRL-W to search for the word under the cursor in a given path.
Of course these match words, not function definitions, so they may match calls to a given function or variables with the same name. But that's th price you'd have to pay for not using ctags
, I guess.
精彩评论