Create tags in emacs

A quick summary on what are tags and how to create them

find . -name \*.\*pp | xargs etags

create the tags from *.*pp files, including .cpp and .hpp. With the tags file, you can do “esc .” on the current function or variable and find its definition.

To go back to the original location, do esc *

Additional notes

1.  Find

To get multiple patterns of files that we want to generate tags for

find . -name “*.hh” -o -name “*.C” (for *.hh an *.C)

http://stackoverflow.com/questions/1133698/find-name-pattern-that-matches-multiple-patterns

2. “xargs” just pipe in the stdin arguments

3. A documentation on tags for emacs

http://www.gnu.org/software/emacs/manual/html_node/emacs/Tags.html

Advertisements
This entry was posted in Tools and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s