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.
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.
Comments