In my old VIM version (5.4) I could put the line "set nu" in
my .exrc file and have line numbers on the file I was editing.
Since I upgraded to VIM 7.0, I've discovered no option for the
.vimrc file to do the same thing.  Have I missed something?

Putting the "set nu" in your vimrc *should* do exactly as you expect. However, some plugin or something of the sort may be changing the setting later in the course of startup. You can try

        :verbose set nu?

from the command line after starting up, and it should tell you from whence it was last set. If it's not your vimrc (which it *should* be), it should indicate what's happening.

Another remote possibility is that, with vim7, there's a 'numberwidth' setting that controls the width of the column in which the line-numbers are displayed. You might have this set to its minimum of 1 perhaps?

To demonstrate that it *should* work, you can create a file called vimrc_justnumber, containing the single line "set nu", and then start vim with

        vim -u vimrc_justnumber

which should use this custom vimrc and set *only* that one option.

HTH,

-tim


Reply via email to