How do I show line numbers in vi?

How do I show line numbers in vi?
Answer
To activate the line numbering, set the number flag:
  1. Press the Esc key to switch to command mode.
  2. Press : (colon) and the cursor will move at the bottom left corner of the screen. Type set number or set nu and hit Enter . :set number.
  3. Line numbers will be displayed at the left side of the screen:
2 окт. 2020 г.
 

Tìm kiếm

Back
Top