A note for myself on how to show line number in vi. Always need to edit my code in vi mode, but my vi doenst show line number by default. and i always look for the command to show line number in vi. This is very inefficient. So i decided to made this post to remind myself on how the command to show line number in vi editor.
To show line number in vi editor, follow the steps below:-
Advertisements
- Once you are in the vi editor screen, you can type the command below:-
:set number
- Once entered, you will see the line number showing at the left hand side of the file content.
- In case you want to hide the line number, you can use the command below:-
:set nonumber
Related posts:
SVN: How to commit only modified files via command line
How to create symbolic link in Unix
How to extract password rar file in command line - Linux
How to setup SSH without password
How to move cursor to end of file in vi editor
How to auto start Apache during boot time - Linux
How to use apt to list available packages?
How to block .log file using in .htaccess
Share this with your friends:-
Why not put that command in your vi/vim rc file?