Ctags CV include header file index
At some point, in order to easily see the definition of the related structure or data type in the header file, we want to delve into the head file, where Vim is not as visible as the various IDE tools under Windows, but there are powerful tools, such as Ctags.
Ctags principle is in the header file directory, according to the library file naming habits, automatically find related library header files, and resume index.
For Linux, most libraries are placed in the/usr/include/folder, and most of the header file references are here when we write the code. using Tools Ctags
Establish steps
1. Download and install Ctags Tools, installed on the need, installation method, I use ubuntu16.04, convenient use of Apt-get install ctags to get it done;
2. Because the header files are all under/usr/includes/, the operations are performed in this directory:
$SU Root
#cd/usr/includes/
3. Then use the tools.
#ctags-R lib*
Note that this folder should have root permissions;
Then a tags file is generated under the folder
4. Use Vim to open to see the index file:
#vim tags
5. Enter in the bottom row mode of the index file
: TS pthread_attr_t
Then, you can see the relevant information, according to the prompts to enter the corresponding number + return, you can find the definition of the type declaration;
6. If you find a definition that has a heavy and unclear data type, you can move the cursor over the data type name and press the key combination:
CTRL +]
You can dive in and see the definition of the unclear data type, so that you can go deep into the layers.