john-jones
john-jones

Reputation: 7780

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 vim

Upvotes: 1

Views: 1289

Answers (1)

johnsyweb
johnsyweb

Reputation: 141998

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.

Upvotes: 1

Related Questions