Join talkVim (14th back: Vim plug-in configuration file)

Source: Internet
Author: User

Join talkVim (14th back: Vim plug-in configuration file)

Hello, everyone. You are welcome to join in to hear the story of Zhang huiti: Vim. The last time we summarized the "Dragon knife: Vim"

Various methods. In this case, we will not talk about Vim's knife. Let's talk about the Vim plug-in today. Okay, let's just say that,

The words are right. Let's talk Vim together!

In Linux, applications have a special feature, that is, they all have a configuration file (either a Startup File or an initialization file ).

You can customize attributes of an application by modifying the configuration file. Vim is a classic text editor on Linux. It is no exception.

There are two files:

A:/etc/vim/vimrc

B:/home/username/. vimrc (here username is the user name on Linux)

When Vim is started, the values in the configuration file are read to set the relevant attributes of Vim. Read the value in A first, and then the value in B.

In general, you can modify the configuration file if you have set Vim-related attributes. Configuration File A is used by all users on Linux.

Therefore, we recommend that you modify the configuration file B, which is used by all users on Linux. Different users have different set values, and

Each user does not affect each other. This can be seen from the file path.

After seeing what the Vim configuration file is, let's talk about how to set the configuration file. Let's use the old rules first.

Child. Open the configuration file, enter set nu in the file, and then save. Use Vim to open a file.

The row number appears at the edge. It's amazing. In fact, this is an example of setting the Vim attribute. We used the set command in the example and set the line

Number (set nu ). Vim reads the configuration file when it starts. It finds that the configuration file has the property of displaying the row number.

The row number is displayed on the far left of the file.

Look at the officials, Vim has many attributes. Today we mainly talk about what is a configuration file, and how to modify the configuration file to set the Vim

Attribute. As for the set attributes, we will provide specific instructions in the subsequent chapter. You can set it based on your habits.

Vim attribute, which is one of the reasons why Vim is popular.

For more information, see the Vim configuration file. In the future, we will introduce how
Set other Vim attributes. What should I do later? In addition, the next loop is decomposed.

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.