Vi/Vim editor has a handy option when it comes to editing a file:
line numbers. This shows how to
turn on and of the display of line numbers in vi or vim editors
Vi / vim has two working modes:
Command mode and
INSERT mode(-- INSERT --). You can switch between them, using the ESC key. Following commands require you to bee in vi / vim
command mode.
While editing a document, type the following to
turn on line numbers in vi / vim:
Code:
:set number
Same for
turning off the line numbers in vi / vim:
Code:
:set nonumber
Post your comments;