Archive

Archive for December, 2009

Vim Plugin: Taglist

December 15th, 2009 2 comments

vimHi all. Inspired by catonmat, I am staring a series of article about useful Vim plugins.The first post in this series will be about a plugins called “taglist.vim“.

Here is what the home page of Taglist Plugin says:

The “Tag List” plugin is a source code browser for the Vim editor. It provides an overview of the structure of source code files and allows you to efficiently browse through source code files in different programming languages. It is the top-rated and most-downloaded plugin for the Vim editor.

The taglist plugin groups and displays the functions, classes, structures, enumerations, macro definitions and other parts of a source code file in a Vim window. The taglist plugin will automatically highlight the current tag. You can jump to the definition of a tag by selecting the tag name from the taglist window. For a list of features supported by the taglist plugin, visit the features page.

The taglist plugin requires Vim version 6.0 and above. The taglist plugin will work on all the platforms where the exuberant ctags utility and Vim are supported (this includes MS-Windows).

Install exuberant ctags in Debian based distributions using apt.

$ sudo apt-get install exuberant-ctags

Now download the latest Taglist plugin from here. Unzip the files to the $HOME/.vim or the $HOME/vimfiles or the $VIM/vimfiles directory. After this step, you should have the following two files (the directory structure should be preserved):

plugin/taglist.vim – main taglist plugin file
doc/taglist.txt    - documentation (help) file

Change to the directory containing taglist.txt. Start Vim and run the “:helptags .” command to process the taglist help file. Restart Vim. You can now use the “:TlistToggle” command to open/close the taglist  window. Use ‘Ctrl+w w’ to toggle between Taglist window and source code window. You can use the “:help taglist” command to get more information about using the taglist plugin.

Screenshot:

Taglist ScreenShot

For more information got to Taglist project page.

Categories: HOW-TOS, VIM Tags: