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:
How to install SVN 1.6 on CentOS 5
How to flush DNS cache in Linux / Windows / Mac
How to extract .bz2 file in Linux?
How to block all file access except one using .htaccess
How to setup syslog server in UBuntu 8
Secure file transfer thru scp in Mac and Linux
How to install LAMP (Apache, PHP and MySQL in Linux) using Yum
How to add Primary and Secondary DNS server - /etc/resolve.conf - Linux
Share this with your friends:-
Why not put that command in your vi/vim rc file?