How do I make the vi editor display line number

How do I make the vi editor display or hide line numbers?
To make vi display line numbers, you need to set the number flag.

Press the Esc key if you are currently in insert or append mode.
Press : (the colon). The cursor should reappear at the lower left corner of the screen next to a : prompt.
Enter the command: set number
To turn off line numbering, again follow the preceding instructions, except this time enter set nonumber the : prompt:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s