Ctags (Generate tag files for source code) is a handy code reading tool under Vim. Although Ctags can also support other editors, it officially supports only vim. And Ctags is already installed by default in Vim, which can help programmers navigate through the source code with ease.
Ctags can locate the following:
1) macros defined with # define
2) The value of the enumeration type variable
3) definition, prototypes, and declarations of functions
4) Namespaces (namespace)
5) type definition (typedefs)
6) variables (including definitions and declarations)
7) class, struct (struct), enum type (enum), and Union (union)
8) member variables or functions in classes, structs, and unions
1. First install the Ctags tool:
sudo apt-get install Ctags
2. Configure the Ctags tool:
Cd/usr/include
sudo ctags-r./
VIM/HOME/LINUX/.VIMRC the last side of the script file, add the following set Tags=/usr/include/tags
Ctags-r//means that under a folder ctags all the symbolic information under the current folder is collected, into the SU root user, and then you can use
Vim-t alloc_chrdev_region//can find alloc_chrdev_region this symbol information.
3. Application
Enter define out with CTRL +]
Return to the original place: Ctrl + T
Ctags application in Vim