Sorry I am trying to configure ctags with emacs but I am in trouble.
I compiled global with this configure:
./configure --with-universal-ctags=/usr/local/bin/ctags
and I executed make && make install
.
Then I changed the default target in the file .globalrc from native to new-ctags.
Finally I executed ggtags-create-tags
within emacs.
Unfortunately I got the error
‘gtags’ non-zero exit: gtags: execvp failed.
gtags: unexpected EOF.
Can anyone help me, thanks
To use ctags with emacs, you must supply the '-e' parameter to instruct ctags to generate an emacs tag file. The commands below are often sourced into a Makefile and then run with a CompileCommand. Ctags also has a recursive option, '-R' . This is the most common (and simple) usage.
' ( 'find-tag' ) – find a tag, that is, use the Tags file to look up a definition. If there are multiple tags in the project with the same name, use ` C-u M-. ' to go to the next match. 'M-x find-tag-other-window' – selects the buffer containing the tag's definition in another window, and move point there.
DESCRIPTION. rusty-tags creates tags for source code navigation using ctags for a cargo(1) project, all of its direct and indirect dependencies and the Rust standard library. It can be run anywhere inside a cargo project.
Using universal ctags is as simple as:
Run over a project (-R
is to walk the project recursively, and -e
is to use Emacs-compatible syntax):
$ ctags -eR
Alternatively if you like to only include files with certain extensions, you can use -a
(append, creates a file if doesn't exist) option with find
utility, like:
$ find -name "*.cpp" -print -or -name "*.h" -print -or -name "*.hxx" -print -or -name "*.cxx" -print | xargs ctags -ea
Run M-x visit-tags-table in Emacs, and navigate to the created TAGS file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With