Vim Open file is, the default line number is not prompt.
As for the purpose of displaying the line number, it varies
Linux The next host may have n accounts. There are two types of configurations: Configure only the current account, configure all accounts
Vim configuration file path (Centos 5.5 final):/ETC/VIMRC
If there is no vim profile in the current account directory, it can be CP/ETC/VIMRC to the appropriate directory. After CP, use chmod to change the file user group and user, and MV VIMRC. VIMRC to set the file as a hidden file
One. Change all account Configurations
Change/ETC/VIMRC directly
Vim/etc/vimrc
Add set Nu at the end of the VIMRC file
Wq exit. This way, no matter which account you use to log in, Vim opens and displays line numbers
Two. Configure the environment for the current user
Locate the current user's VIMRC file. If you do not have this file, you can create this file.
Vim ~/.VIMRC
After opening the file, add the last
Set Nu
Wq exit.
Open with Vim again to display the line number.
The above summary is only implemented in text mode. No tests were made in the GUI. The results of the search are as follows: Under the GUI, you need to change the GVIMRC (not tested under the GUI for reference only)
Display line number, for code content and format have insight please leave a message, hey
VIM displays line numbers when opening a file