Ubuntu 14.04 + vim + ctags + taglist installation and use
install Ctags, and execute the following command:
sudo apt-get install Exuberant-ctags
Note: You can also use the source code installation
to install TagList, follow these steps:
1. Download taglist, the specific Web site is as follows: http://www.vim.org/scripts/script.php?script_id=273
2. Extract Taglist_46.zip, execute the following command: unzip-d taglist taglist_46.zip
3. Create a. Vim folder in the home directory, and then copy the doc and plugins directories in TagList to the. Vim folder.
4. Configure the TagList environment as follows:
CP Doc/taglist.txt/usr/share/vim/vim74/doc
CP plugin/taglist.vim/usr/share/vim/vim74/plugin/
5. Open TagList By default, you need to configure the following:
Edit the/ETC/VIM/VIMRC file and add the following configuration information at the end of the file:
Let Tlist_auto_open = 1
Let Tlist_ctags_cmd = '/usr/bin/ctags '
Let Tlist_show_one_file = 1
Let Tlist_exit_onlywindow = 1
* * Note: **vim has multiple profile VIMRC, such as/ETC/VIMRC, which affects vim throughout the system, while ~/.VIMRC affects only the vim of the user, when the configuration in ~/.VIMRC file overrides the configuration in/ECT/VIMRC.
vim+taglist+ctags Source code reading, the steps are as follows:
1. Generate function and variable symbol information. Use ctags complete, specific execution: Ctags-r * (R recursive most commonplace)
2. Check whether the generated tags, use: ls-l tags. * * Note: The **tags file consists mainly of the following list of objects: macros defined using #define, values of enumerated variables, definitions of functions, prototypes and declarations, namespaces, type definitions, variables (including definitions and declarations), classes (Class), struct (struct), Enum types (enum), Union (Union), member variables or functions in a class, struct, and union.
3.vim Input: Tlisttoggle Open the side window or directly use: Tlist, Tlistopen Open.
4. The commonly used commands are as follows: VIM-T tag: Replace the tag with the name of the variable or function you want to find, and then open the file that has the corresponding variable/function directly: TP represents the last Marker: TN represents the next marker Ctrl +]: Jumps to the function you want to find (you can jump to another file) Ctrl + O (large O): Back to the original file in the CTRL + W + W: Left and right window to jump enter: View functions in the current file
Reference Documents
http://blog.csdn.net/duguteng/article/details/7412652
http://blog.csdn.net/daniel_ustc/article/details/8299096