In visual studio it \'s easier to push F12 button to jump to a declaration of a function or variable when editing C/C++ code.
Is there a short-cut key in emacs to do th
There are multiple ways to do this. As darioo mentioned, Ctags is one, but it goes to the definition by default (which might work for you). Looking further, though, you can see that prefixing M-.
(ie, C-u M-.
) will take you to the next tag match (which is often the declaration). There is also a --declarations
option, but Exuberant Ctags doesn't seem to support it.
CEDET is another option, but in my experience, it's still not ready for production. Often times in C++ semantic-ia-fast-jump
will go to forward declarations instead of the definition or the declaration.