I'm using the Vim text editor GVIM
on a Windows-based machine.
How can I show the line numbers? Provided that I'm not using it in the console?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityRun :set number
to add a left margin with the line numbers. Use :help 'nu
to see help on the topic, including changing the margin size.
For some permanence, place the command, without the leading colon, in ~/.vimrc
on UNIX/Linux based systems or in %HOMEPATH%\_vimrc
.
:set number
on VIM, and got a black blank screen with "1" written at the top left I think indicates the line number. How can I make this effect occur to GVIM
? @akira, you mentioned saving to .vimrc
. Will that do the job? If so, ho can I make this save? Thanks.
Jan 25, 2011 at 13:59
_vminfo
at the location you suggested, and there was :set numer
, but I couldn't see the line numbers. Why is that? Thanks.
Jan 25, 2011 at 19:48
:set number
will add the line numbers to the left hand side of the buffer.
You can put that setting, along with any others you enjoy inside your .vimrc
file and they will automatically get loaded whenever you start an instance of VIM.
.gvimrc
is generally reserved for specific settings you want loaded when you open gvim as opposed to terminal sessions of vim or vi. More often than not this file has graphical considerations that the X server can handle.
:set nu
should display the line numbers
:set nonu or :set nu!
will make the line numbers vanish.