My Tech notes: Source Code Browsing In Linux-CTAGS usage
Subscribe

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Tuesday, October 28, 2008

Source Code Browsing In Linux-CTAGS usage

How to use ctags command in linux? explained in simple steps.
CTAGS is a good utility for source code browsing in Linux through vi editor. To use ctags , at the source code directory enter

# ctags -uR *

This will create tags file in the source code.

Open a file in that source code using vi editor & set the tags file for that file using " ESC + :set tags=tags" ( path of tags file . if it is at different level then give the entire path like ../tags or ../../tags ).

Once the tag file is set for that file, then you can look the at function definitions, variable declarations, .......... by placing the cursor on that function call or variable & press "CRTL + }" and for coming back to same place press "CTRL + t" key sequence.

Follow CTAGS documentation for more insight.

No comments:

Post a Comment