- It is a programming tool that generates index file of names found is source and header file.
- It is used in many programming languages.
- Functions, variables, class names, structures, macros are indexed, but what all names can be indexed depends on the programming language.
- Most commonly used ctags with vim editor is Exuberant Ctags.
- To enable ctags in a source file give the command ctags -R *
- It parses all the names and creates a stack for each name.
- To view the definition of a function or a structure we need to take our cursor over it and enter ctrl+] command.
- To come back to fucntion call from definition we use ctrl+t.
- Following vim commands can be used to navigate through relevant functions
:tselectshows the list
:tnextgoes to the next tag in that list
:tprevgoes to the previous tag in that list
:tfirstgoes to the first tag of the list
:tlastgoes to the last tag of the list