Search This Blog

Loading...

Thursday, April 2, 2009

Show line numbers in vi or vim

While editing a document (and not inserting text), type the following to turn on line numbers:

:set number

If you tire of the line numbers, enter the following command to turn them off:

:set nonumber

2 comments:

RoMBiN said...

...and if you want to turn on syntax highlighting type:
:syntax on
...and if you want to have it permamently
echo "syntax on" >> ~/.vimrc

Anonymous said...

that was helpful