Monday, June 1, 2009

Exuberant Ctags

I've been spending more time in Vim than Eclipse recently, so I was missing the source navigation features of Eclipse. Well, I finally dug into making ctags work, so I have my basic navigation features back again (the "go to definition" kind).

Then I found out that GNU ctags doesn't seem to support local variables. Then I found Exuberant Ctags, which is working great for me (in C and C++, at least). For now, I use an alias defined like so:

alias tags='$HOME/.local/bin/ctags --c++-kinds=+l --c-kinds=+l'

I wonder if there's some way to tell Vim to update the tags for a project each time I save ...


  1. Hi, have you ever tried the taglist? The taglist provides a source code browser function and it has helped me a lot.

    I know almost nothing about ctags and just know that the taglist works with ctags. Hope the information didn't bother you.

  2. Sorry, forget to mention that the taglist is a plugin of the vim.

  3. I hadn't heard of it. Thanks for the tip. I'm back more in Eclipse these days, but I might be back more to Vim some day. Seasons change for me, sometimes.