Andrew Channels Dexter Pinion

Wherein I write some stuff that you may like to read. Or not, its up to you really.

February 12, 2003

Class Browser in Vim

Prompted by Danny O'Brien I thought I would extend my Vim setup to include the source code class browser he mentions. Little did I know what I was letting myself in for.

It is a common failing of open source/free* software that the documentation could do with more work. Everyone is keen to monkey about with the code but rarely do programmers like to write documentation. When they do, they assume that you are running the software on exactly the same platform that they are, and that you have the same knowledge as they do. This is a mistake I try and avoid in my documentation, and some projects address quite successfully - look at Dan Shafer's PythonCard tutorials for an example of good practice.

Anyway, I downloaded the script, and the Windows source and binary distribution of exuberant ctags. Then it took me about three hours of mucking about and surfing the web to actually get them working.

To save you the same bother, here is what I did;

  1. Unzipped the ctags distribution and extracted the ctags.exe file. The rest is just the source code.
  2. Placed the exe file in a directory on my path (this is very important but not mentioned in any of the documentation!). I simply put it in the same directory as gvim.exe because that is already on my path
  3. Verify that ctags is working by starting up a command line window and simply typing 'ctags'. If this works we can continue, if not you need to play with your path.
  4. Tell Vim that you've got ctags installed by adding the following line to your _vimrc file;
    let Tlist_Ctags_Cmd='ctags.exe'
  5. Download the taglist.vim file and place it in your plugin directory, the path to mine is C:\Program Files\vim\vim61\plugin yours should be somewhere similar
  6. Fire up Vim and open a source code file, mine are Python naturally, at the command prompt type 'Tlist' and Bob should be your auntie's live in lover

Easy, really. Now all I need to do is get it working on my Debian box at home.

* - Delete as appropriate.

Posted by Andy Todd at February 12, 2003 11:16 AM


It is really useful, I really appreciate it.

Posted by: Wenpan on August 20, 2003 08:56 PM

Uhm, yeah i don't think this helps on winnt/2k and up.

I have it working on my linux box without trouble but here I have to use windows. I got vim working just fine, but I get some error that it cannot open %USERPROFILE%\Temp\VIonn.tmp with nn beeing some random letters/numbers.

I searched like crazy but can't find why it's not working. It doesn't work for TList nor TMenu (tagsmenu.vim)

Posted by: oliver on September 30, 2003 02:24 PM