Show line numbers in vim

I want to save this little trick for later. To get vi(m) to show line numbers, use the following command:

:set nu

Hit escape first in case you’re in input mode. Then simply type the colon set nu and hit enter.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.