Sure does. :) `gd`
E492: Not an editor command: gd
VIM 8.2
Do I have to activate it somehow? :)
int foo ()
{
return 3;
}
int bar()
{
return foo();
}
put your cursor somewhere on the "foo" identifier in the second to last line and type "gD" (without the quotes). It should jump to the definition of foo. It's not perfect but works for much code without crazy preprocessor stuff. By default it's file-local, but you can give vim a list of include files to search as well.Specifically it's one of the 'g' commands (like gg which goes to the top of the file and gG goes to the bottom). Just put your cursor on an identifier and gD (goto definition is the mnenomic).
:help g