Install and configure the vim taglist plugin

Source: Internet
Author: User
Tags switch case

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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.