Vim Configuration (iv): using the TagList plugin

Source: Internet
Author: User
Tags prototype definition tag name

1.taglist Plugin Download
Wherever you go from, csdn Resources or vim website

I downloaded it: taglist_46.zip


2. Create a. Vim in the ~/directory.
Put yesterday's. VIMRC into the. Vim Directory
CD ~
mv. Vimrc. Vim

mv. Viminfo. Vim


3. Unzip the taglist_46.zip into the ~/.vim
[Email protected]:~/.vim# unzip Taglist_46.zip
Archive:taglist_46.zip
Inflating:plugin/taglist.vim
Inflating:doc/taglist.txt
[Email protected]:~/.vim# ls-a
.  .. Doc plugin taglist_46.zip. Viminfo. VIMRC


4. Add the following in the ~/.VIM/.VIMRC:
Let tlist_show_one_file=1
Let Tlist_exit_onlywindow=1


5. After entering vim, open the TagList window with the following command
: Tlist


6. TagList Common commands:


Open the TagList window using
: Tlist (: Tlistopen,: Tlisttoggle)
Close the window to use
: Tlist (: Tlistclose,: Tlisttoggle)


Shortcut keys available in the TagList window:
<CR> jump to the location defined by the cursor under tag, and double-click the tag function with the mouse (but to open this feature in the VIMRC file)
o display the cursor under tag in a newly opened window
<Space> display the prototype definition of tag under cursor
U update tag in taglist window
s change sort mode, toggle between sort by name and sort by order
x taglist window zooms in and out to make it easier to see longer tags
+ Open a folding, with Zo
-Fold the tag together with ZC
* Open all folds, with ZR
= Fold all tags together with ZM
[[Skip to previous file]
]] to skip to the next file
Q Close TagList window
<F1> Show Help


7. Some other setup options can be added in the VIMRC script, such as:


The Set Ctags path
Let Tlist_ctags_cmd = '/usr/bin/ctags '


"Automatically open the TagList window after Vim starts
Let Tlist_auto_open = 1


"Does not display multiple files at the same time, only one
Let Tlist_show_one_file = 1


"When the TagList is the last window, exit vim
Let Tlist_exit_onlywindow = 1


The TagList window appears on the right, and the default is left
Let Tlist_use_right_window =1


"Set taglist window size
"Let Tlist_winheight = 100
Let Tlist_winwidth = 40


8. Reference article: http://blog.csdn.net/duguteng/article/details/7414592
-The Tlist_ctags_cmd option is used to specify the location of your exuberant Ctags program, if it is not in the path defined by your PATH variable, you need to use this option to set it up;
-If you do not want to display the tags in multiple files at the same time, set Tlist_show_one_file to 1. The default is to display the tag in multiple files;
-setting Tlist_sort_type to "name" allows TagList to be sorted by tag name, by default in the order in which the tag appears in the file. Sort by the scope of the tag (that is, the namespace or class that belongs to), has joined the TagList Todo List, but has not yet supported;
-If you are thinking that the TagList window is the last window when you exit Vim, set Tlist_exit_onlywindow to 1;
-If you want the TagList window to appear on the right, set Tlist_use_right_window to 1. The default is shown on the left.
-In Gvim, if you want to display the TagList menu, set Tlist_show_menu to 1. You can use Tlist_max_submenu_items and tlist_max_tag_length to control the number of menu items and the length of the Tag names displayed;
-By default, when you double-click a tag, you will jump to the location of the tag definition, if you want to click on the tag to jump, set Tlist_use_singleclick to 1;
-If you want to automatically open the TagList window after starting vim, set Tlist_auto_open to 1;
-If you want to automatically close the TagList window after selecting the tag, set Tlist_close_on_select to 1;
-When the tag is displayed in multiple files at the same time, setting Tlist_file_fold_auto_close to 1 allows taglist to display only the current file tag, and the tags of the other files are folded up.
-When using: Tlisttoggle to open the TagList window, if you want the input focus in the TagList window, set the Tlist_gainfocus_on_toggleopen to 1;
-If you want TagList to always parse the tag in the file, regardless of whether the TagList window is open, set tlist_process_file_always to 1;
-Tlist_winheight and Tlist_winwidth can set the height and width of the taglist window. Tlist_use_horiz_window for 1 setting taglist window horizontal display;


9. Extracting other people's configuration (http://blog.csdn.net/neomc/article/details/6030878)
Let tlist_show_one_file=1
Let Tlist_onlywindow=1
Let tlist_use_right_window=0
Let tlist_sort_type= ' name '
Let Tlist_exit_onlywindow=1
Let Tlist_show_menu=1
Let tlist_max_submenu_items=10
Let tlist_max_tag_length=20
Let Tlist_use_singleclick=0
Let Tlist_auto_open=0
Let tlist_close_on_select=0
Let tlist_file_fold_auto_close=1
Let Tlist_gainfocus_on_toggleopen=0
Let Tlist_process_file_always=1
Let tlist_winheight=10
Let Tlist_winwidth=18
Let tlist_use_horiz_window=0
"To make it easier to use, you can include the following in the. vimrc file:
Map Tl:tlisttoggle


10. Current Experience:
Use or unfamiliar, and open, you need to manually ": Tlist" to open taglist, need to manually set tags=xxx use Ctags, more trouble
And some settings don't seem to work, it takes a long time to study
Rear plug-in installation: Cscops + Winmanager Plug-in

Vim Configuration (iv): using the TagList plugin

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.