Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I automatically follow a header file in Emacs?

Tags:

emacs

If I come across something like #include "somewhere/myheader.h" can I automatically jump to that header somehow? (Similar to how gtags works?)

like image 964
Bill Avatar asked Mar 26 '10 16:03

Bill


2 Answers

call (ffap-bindings) in your ~/.emacs. That will bind C-x C-f to find-file-at-point.

Then place the cursor on the include line (inside the file-path) and press C-x C-f

like image 147
xxxxxx Avatar answered Nov 07 '22 18:11

xxxxxx


With CEDET (a standalone package for now; will be a part of Emacs 23.2) you get the command semantic-decoration-include-visit which does what you want.

like image 36
Laurynas Biveinis Avatar answered Nov 07 '22 17:11

Laurynas Biveinis