All Things Techie With Huge, Unstructured, Intuitive Leaps
Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

Linux Bash How to show line numbers in vi

This is more of a reminder to myself than anything else. When I am working directly on the Linux server (Centos is my flavor of choice), I often need to find a line number. I have used vi and other editors for a long long time (since the days when unicorns wandered the earth), but I still forget some things. Like today, I had to look up how to turn on line numbers in vi.

It really is simple.

Hit the "Esc" escape key and type:

:set number

On some flavors of Linux:

:set nu

also works.


Easy peasy, now if I can just remember this.