Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

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. To do so:

  1. Press the Esc key if you are currently in insert or append mode.

  2. Press  :  (the colon). The cursor should reappear at the lower left corner of the screen next to a  :  prompt.

  3. Enter the following command: set number
  4. A column of sequential line numbers will then appear at the left side of the screen. Each line number references the text located directly to the right.

To turn off line numbering, again follow the preceding instructions, except this time enter the following line at the  :  prompt: set nonumber

Normally, vi will forget the setting you've chosen once you've left the editor. You can, however, make either setting take effect automatically whenever you use vi on a particular account. To do this, place the appropriate set statement as a line in a file in your home directory named .exrc .

For a list of all current settings, at the  :  prompt, enter: set all For a list of everything that you have set, at the  :  prompt, enter: set

At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?

This is document afcx in domain all.
Last modified on May 13, 2009.

I need help with a computing problem

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.



Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

I have a comment for the Knowledge Base

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.