Showing line numbers on vim
Sometimes you really need to see the number of the line where you are while editing a text file, if you like vi / vim, this will help you how to turn on and off the numbering of lines.
Turn on the number display on vim
While editing the file enter:
:set nu
or
:set number
Turn off the number display on vim
While editing the file enter:
:set nonu
or
:set nonumber
Printing the numbers
Sometimes you want to print those numbers, specially if you are debugging software, so enter:
:set printoptions=number:y
Note: Remember that you can always put these commands in your $HOME/.vimrc in order to have them as defaults
Trackback URL for this post:
If you like this article, subscribe to our full rss
Please post your question in our forum and use comments only to leave your comments about the article, thanks.













to toggle use :set nu!
to toggle use
:set nu!
these keypoints are very
these keypoints are very valuable for my project work..
thanks for sharing such a nice article.
regards,
wireless burglar alarm
Post new comment