My software notes

August 15, 2007

.vimrc for Mac users

Filed under: mac — kpwu @ 8:11 pm

I really don’t know why Apple doesn’t do the similar things like other Linux distribution makers. The default vim is very simple–many setups are not switched on. For example: “syntax color”, and “ruler”.
For mac users, just edit .vimrc at HOME, add two lines:
set syntax enable
set ruler

Your vim will show syntax color when you are working on some program codes and the right bottom corner will show the current position. Then, I don’t need to run “set nu” to see what’s the number of the current line I am..

Here are the screenshots:
The simple mode, no color for the syntax and no position ruler is shown.

Better mode, syntax is colored and the ruler is shown!



  1. i had to set this:

    syntax on
    set ruler

    Comment by nils petersohn — December 9, 2008 @ 2:01 am | Reply

  2. I too had to use:
    syntax on
    set ruler

    The screenshots show a rxvt terminal, so I wonder if a different vi(m) is being used. I am running vim 7.2 (the default with Leopard).

    Comment by Jeffrey Wilson — February 12, 2009 @ 11:18 am | Reply

  3. Perhaps both ways are doable.
    I am using VIM 7.2 now. But I don’t know if I also used 7.2 when I made this post because
    I have upgraded from tiger 10.4.9 to leopard 10.5.6 last month.

    Comment by kpwu — February 12, 2009 @ 2:21 pm | Reply

  4. Yes. I had to use :
    syntax on
    set nu
    set ruler

    Comment by Arunabh Das — October 13, 2010 @ 7:32 am | Reply

    • This is what worked for me also. I’m on a Mac OSX 10.4 with ViM 7.0.224.

      Comment by Marnie — February 12, 2011 @ 12:41 pm | Reply

  5. You can copy the sample file from location:


    Comment by Shivendra Dayal — January 29, 2012 @ 8:02 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: