Everyone crossing, welcome to listen to the large-scale couplet science fiction: Vim. Last time we introduced the ctags in the Vim plugin.
This time, let's continue to say the plugin. Or that sentence, gossip Hugh, words return to the positive turn. Let's talk about vim together!
Crossing, we said in the last time how to install VIM plug-in ctags into the system. Some crossing told me that I would not use this plug.
Thing Crossing, we are going to talk about how to use ctags this plugin.
Crossing, the steps to use Ctags are as follows:
As we said in the previous reply: Ctags is mainly used to generate files with tags tag. Do you remember our metaphor? tags text
Pieces are like maps. Then creating a tags file is making a map. We can use the command: Ctags-r to generate the current directory
tags file for all files under (including subdirectories). The default generated tags file is called tags (note that there is no suffix).
I suggest that by modifying the Vim configuration file, Vim will automatically import the tags file when it is launched. How to modify Vim
Configuration file that we have already said in the previous back, look at step 4 in detail.
Use VIM to open the program file, put the cursor on a function, press CTRL +] to quickly jump to the letter
Where the number is defined, so that we can quickly find the implementation of the function. I am here to add that this
Open the program file, must be in the directory to generate tags, or vim will prompt: Can not find tags information.
Crossing, in general, we use Vim+ctags to read the program's source code, which is very powerful ctags provides
You can quickly locate the function definition, save us the time to find the function, and thus improve the efficiency of the source code of the Reading program.
You crossing, about the Vim plugin: Ctags, today, so far. In the back of the chapter, we will also say that the other VIM plug
Thing Do you want to know what plugins are in the future? and listen to tell.
Talk vim together (16th: Vim plugin ctags cont.)