The taglist is based on the tags file and requires the ctags to generate the tags file.
Run Yum install ctags for Redhat and centos, and run apt-Get install ctags for Debian and ubantu.
Download taglist at http://sourceforge.net/projects/vim-taglist/files/vim-taglist/
Decompress taglist_45.zip. You can see two directories: Doc and plugin. The structure is as follows:
taglist_45
||-------- doc| \-------- taglist.txt
|\-------- plugin \-------- taglist.vim
Run the following shell command to complete the installation.
cp doc/taglist.txt /usr/share/vim/vim72/doc/cp plugin/taglist.vim /usr/share/vim/vim72/plugin/
Usage:
Run the ctags-R command under the source code directory to recursively create and generate the tags file for each directory.
Use Vim to open the source code file and run tlist in command mode to enable the taglist plug-in. <F1> you can view the help information of taglist.
Attach my vim configuration file. vimrc
"Syntax highlight syntax on" show row number set number "automatic indent and C language style indent set autoindentset cindent" indent width set tabstop = 4 set softtabstop = 4 set shiftwidth = 4 "we recommend that you enable the expandtab Option, the tab is automatically expanded with spaces, and the code indent will be more beautiful.
Set expandtab "set noexpandtab" Switch case alignment style set cino = G0,: 0 "" taglist "Let tlist_show_one_file = 1" only display the tags of the current file
Let tlist_winwidth = 40 "set the taglist width
Let tlist_exit_onlywindow = 1 "The taglist window is the last window, and exit Vim
Let tlist_use_right_window = 1 "display the taglist window on the right of the vim window