I'm never quite the Vim kinda guy. I attribute it to my college programming labs that marred any impressions of command-line editors. In fact, I probably wasn't even using Vim back in school. Hard to recall but my guess is that it was more likely to be Vi or Emacs.

It was a jarring experience to be thrown into the world of Unix/Linux coming from a pure GUI environment (Windows 95 then) . I started out in MS-DOS 3.1 on an Intel 80286 but the bash shell is its own beast, let alone the various flavours of command-line editors. There is a huge difference between coding Pascal in a GUI environment and hammering out C in Emacs. Well, not in the programming sense, more coming from the angle of the user experience in the IDE.

Ever since I switched to a mac and had to mess around more in the terminal, i started to appreciate how powerful these editors can be. Everything can be done without touching the mouse; all kinds of key strokes to do every imaginable tasks. After observing how some programmers use Vim (or Emacs), I decided to give Vim and myself a chance to be get more acquainted. The learning curve is there if you don't use it all the time but things are definitely picking up.

Today, I got to exploring Vim configuration on the mac. Nothing complicated or groundbreaking. Anyone can do this either through the Vim configuration file at /usr/share/vim/vimrc or .vimrc in your home directory.

set ai         " auto indenting
syntax on      " auto indenting
set hlsearch   " highlight the last searched term

For now, I'm just enabling auto indentation, syntax highlighting and search term highlighting. Search term highlighting just makes it easier to spot strings that you searched in Vim. Some find it distracting for it to be highlighted. It's a small step but at least it's moving and the code looks prettier.

What others think

Tim Robles

Tim Robles
Feb 10 2010

I'm glad you're a believer. Other useful and essential things things are setting the encoding and the tabstop. It's crazy how your .vimrc file is something you just hold onto and develop over the years as you refine it more towards your personal style. Here's mine: http://github.com/roblocop/trlib/blob/master/tools/prefs/.vimrc