If you have been using Vim for a while, you will want to modify some of its configurations, such as displaying the row number by default. Where can I change it?
The answer is:Vimrc
Where is this configuration file?
Open your VI and enter [: Version] in command mode. The following content is displayed:
Therefore, find the vimrc file (or "_ vimrc") in your vim installation directory ("$ Vim" in the image ").
How to use it? For example:
[I want to achieve this-when I use Vim to open a file, the number of lines is displayed by default]
VI does not display the number of rows by default. You must enter [: set number] in command mode ]. This command only applies to the current window. You can open other documents. If you want to display the number of rows, you have to repeat the SET command.
With the configuration file, you don't have to worry about it. Open your [_ vimrc] File, enter [set number] In the last line of the file, and save.
In this way, all the files you open in the future will have a row number.
This is just a small feature, for example.
It can also define its own commands, such as deleting empty lines, so you don't have to remember the hard-to-remember regular expression. Just write it in the configuration file and give it a name (for example: XYZ). Then, enter [: XYZ] to delete empty rows. (I will not repeat this article)
In addition, VIM also comes with a vimrc sample file, vimrc_example.vim
My directory is like this: [$ Vim \ vim73 \]
For other operating systems, see: http://easwy.com/blog/archives/where-is-vimrc/