The Coded One

programming, algorithms, discrete math, open-source

Developing with VIM

leave a comment »

VIM or Vi Improved is a text editor that is very popular among programmers especially those working in *nix environments.  It was originally released by Bram Moolenar in 1991 for the Amiga computer.  http://en.wikipedia.org/wiki/Vim

I have to admit that when I first used VIM, I was very skeptical.  I thought that it was “just another text editor” like nano or pico.  But since I’ve been hearing lots of good things about it, I finally decided to give it a shot.

vim screenshot

I wasn’t immediately converted as a vim user.  I’m used to IDEs like Eclipse and NetBeans.  I was missing lots of things like code completion, folding, automatic formatting, etc not to mention the fact that it was completely a different environment (modal).

But eventually I got comfortable and started having fun with it.  And now with VIM 7 I can do everything that I’ve been missing.  It’s got a legitimate syntax highlighting, code completion, auto formatting, etc.  And you can continue to buff it with plugins and a decent vimrc.  Here’s the one that I compiled based on some of the best vimrcs that I saw.

Some of the reasons why I prefer using it over an IDE are:

  1. It’s lightweight.  It’s blazing fast compared to launching Eclipse.  This comes very handy when you only need to write/edit several lines of code.
  2. You can use it over SSH.  If there’s a file that you need to open/modify on the fly on a remote location, this is just the way to go.  I mean who would like to download, modify, re-upload?
  3. The transition is seamless when in a terminal.  There’s just no better tool for editing config files/scripts.  Also, FYI the bash shell uses VIM mode by default.
  4. You can search/replace using regular expressions.  This feature is one of the reasons why I kept going despite the steep learning curve.
  5. Finally I just don’t see any limit to its capabilities since you can always add custom scripts and install plugins.  Btw, there are over 2,000 plugins that you can choose from in the plugins section of vim’s website.

Written by Mark Basmayor

February 26, 2009 at 3:37 pm

Posted in Linux, Ubuntu

Tagged with , ,

Leave a comment