开发者

Jump to function definition in vim, without using plugins or ctags

开发者 https://www.devze.com 2023-01-19 11:46 出处:网络
is it possible to jump to function definitions in vim without using plugins or ctags? and if so, 开发者_开发百科how?

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 vim


Were 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消