I'm using OSX Mavericks. Using VIM 7.3, I can't seem to get the "hybrid" line numbers to work.

I was reading a tutorial stating that if both set number and set relativenumber were included in the .vimrc file, you could get a relative number on all lines but get the actual line number on the current line you're editing.

I've searched forums and have followed what others have done in terms of my .vimrc file and cannot get it to function. It just presents as if I had set relativenumbers active and not the absolute number for the current line.

Im still relatively fresh to VIM but I have exhausted my knowledge.

The answer was to update vim to 7.4
To do this required the following:

  1. Updating homebrew
  2. Installing python (I read this was a dependency, but not sure)
  3. Installing mercurial (I read this was a dependency, but not sure)
  4. Installing VIM 4.7(+) (through homebrew)
  5. Configuring the path to use homebrew's VIM over the OSX default VIM

1 Answer 1


In Vim 7.3, the combined relativenumber-number setting you describe is not supported. See :help relativenumber, which states that:

When setting this option, 'number' is reset.

Vim 7.4 supports using both together, and the same section says that:

The number in front of the cursor line also depends on the value of 'number', see number_relativenumber for all combinations of the two options.

OSX includes only Vim 7.3 by default, but Version 7.4 is included in Homebrew, and MacVim is also based on version 7.4, so installing one of those will help you get where you want to be.

  • This was it. Updating did require a few other things. I updated the question to include what was necessary for me.
    – visyoual
    Jan 6, 2015 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .