104k views
0 votes
Your company has assigned you to revise 22 scripts. Since you use the vi editor, how can you set it to automatically display lines as numbered so it is easier for you to work on these revisions

1 Answer

1 vote

Answer:

To enable VI editor automatically display lines as numbered, the following steps must be taken:

Step 1: Press the Escape key to exit the insert or append mode.

Step 2. Press the colon key to trigger the cursor. The cursor will appear at the lower-left position of the screen next to a : prompt.

The Next step is to type the following command: set no number hit the enter button to execute the command. This will trigger a column of sequential line numbers will appear at the left side of the display. Each line number references the text located directly to the right of it.

Step 3: To enable this to happen automatically, the appropriate set statement as a line in must be inserted a file in your home directory named .exrc

Cheers!

User Timitry
by
3.6k points