Vim environment variable configuration and background color Configuration

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.