When we use VI or vim, if we want to display the row number, we may do this: switch to the command mode, enter SET Nu, and then press the Enter key to display it; and we are writingProgramSometimes, when you want to press the Enter key, the cursor is not always at the beginning of the line, but aligned with the first non-space character in the previous line, that is, to achieve the so-called contraction function, you can enter SET autoindent in command mode. However, it is too troublesome to input the command like this. Can I set the function automatically every time I use the vim command to edit it?
Briefly describe the configuration steps. The following table shows the vim environment parameters (from laruence's book)
The above are the private dishes of laruence. Below is a simple record of my settings. I want to add the function myself and then add it.
1. Run the command CD/etc/Vim to enter the configuration directory.
2. Run the command Vim vimrc to edit the vimrc file. For Ubuntu, run the command sudo Vim vimrc.
3. In the last line of the vimrc file, add the options you want to set, which are some of the default functions of vim.
4. Use WQ to save the settings.