Inside Out

3 should-use vim plugins

Posted by: arun on: September 10, 2008

The first two are very useful, if you kill bugs for a living (read debugging freak).

  • NERDCommenter
    ‘NERDs use real editors (VIM ;) Flame flame…) and Comment their code’. This plugin helps comment code in almost all languages you program in. The way: select ‘n’ lines in visual mode(or punch in a number in normal mode), use ‘,cc’ for normal commenting of that code. ‘,cu’ will uncomment the lines. ‘,c<Space>’ will toggle the comment status. ‘,cs’ does magic, try it!
  • Taglist
    This is your friend for browsing those 1000x lines of legacy code. All it does is: creates a split window and shows the macros, functions, variables etc.. You can C-w (ctrl+w) to the split window and start jumping through the code. Ofcourse, I agree with the die hard ctags fans. CTags is the ultimate thingy! I prefer not using my best weapon(ctags -R *.cs) against a single progam.cs which has damn 3000 lines of code (its reality! spare me, I din’t write that program :) ). So here’s how to bring down the taglist to single key:
    ! put this in .vimrc/_vimrc
    ! press \tt to toggle taglist on/off in normal mode
    nmap <Leader>tt :TlistToggle<cr>
  • Timestamp
    This will add “time” dimension to your source code. First time you create the file, add these:
    Created: TIMESTAMP
    Last Modified: TIMESTAMP

    Rest assured for the life of that file. Every time you save the file, Last Modified will get updated. For those lazy guys, this is a tool to measure your level of procrastination.

What would be your “three” should-use vim plugins?

5 Responses to "3 should-use vim plugins"

wow vim has plugins?

I’m still learning how to paste! :)

Reading about these plugins they discuss things such as:
|timestamp_automask|
or
|NERDComComment|

What is the meaning of the pipe | uses?

I learnt to paste a few days back actually :) (vim tip)

|AnythingHereIsATag| generally appear in vim docs. They can be used as navigation points (put cursor on the tag, press Ctrl+] will take you to the help page for the tag. Ctrl+T will get you back to original page) or just use :help AnythingHereIsATag to see more info about the tag.

you should try NERD_Tree!

i started playing around with the taglist the other day. i can’t believe i’ve been using vim without it!

Leave a Reply

Tweet tweet!

Visitor Stats

  • 438,466 Hitz

Disclaimer

All the opinions (text and images) expressed in this website are mine. They do not represent the opinion of any living/non-living individual/groups/institutions, I am associated with.

The comments belong to the ip-address they generate from.

Del.icio.us