Ctags basic operations
Ctags usage
Note:
A. ctags can analyze the program to generate the tags file;
B. The generated tags file can be searched by vi-t for struct, data type, and function name location, which is convenient;
Ctags installation:
Sudo apt-get install ctags
Usage:
A. If you want to find the struct, function type, variable type, and function name location contained in a file in a directory, you can generate
A tags file;
To generate a tags file in a directory:
You can first go to alias to check if an alias is defined for it. Generally, ctags is installed. If the command to generate tags is long, the alias is redefined.
For example, the command for generating the tags file defines the alias cindex, So input cindex will generate the tags under this directory;
If cindex fails to be used, sudo + is followed by the full name;
B. vi +-t + the struct name to be searched, data type name, function name, or macro name defined by the System
C. ctrl +] Jump
If a data type is an alias defined by typedef, You need to select the type of the alias, press ctrl +]
If the data type is defined by define macro, find and define its macro, press ctrl +]
Note: When searching, if there is a duplicate name, you can select the serial number and select one at will;
D. ctrl + t implement return
Vim integrates Ctags and Taglist
Use Ctags in Linux to find the source code
Use of Ctags in Ubuntu
Use Sublime Text 2 Ctags under Fedora 19
Create a Vim + Taglist + csags + Ctags editor in Ubuntu
This article permanently updates the link address: