Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to modify Vim default comments

Shulou Source: shulou.com Published: 2022-06-01 03:43:25 10月02日 Update

How to modify Vim default comments, for this problem, this article details the corresponding analysis and solutions, hoping to help more friends who want to solve this problem find a simpler and easier way.

Under Linux vim is commented out of the font color default is very dazzling blue, looks very unclear, we can set the user root directory.vimrc file, you can change the color configuration.

Vim default annotation color is as follows:

Find the vim configuration file,/etc/vimrc

Open it with vim vim /etc/vimrc and press capital G to the last line, insert hi comment cterfg =6 and wq save away

Then when you open the Vim edit file, the comment color changes, as shown below.

It was a very good skill.

PS: The default comment color is 4 and then there are 0, 1, 2, 3, 4, 5, 6, 7 to choose from. You can try anything other than 4 and 0.

0 Black---The default VIM background is black, so if you select 0, you won't see comments

1 red

2 dark green

3 yellow

4 Ugly and dazzling colors, i.e. default colors

5. It's like pink. I don't know what this color is called.

6 light blue

7 White---Don't choose 7, input is not dazzling, but it is too same as others, it is difficult to distinguish which comment is made and which is not commented.

Anything above 7 is white.

About how to modify the Vim default comments on the answer to the question shared here, I hope the above content can be of some help to everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Tags: Comments colors selections dazzling files questions more white blue black help answers configuration easy ugly easy one line bad content can be passed through Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno Linux Docker Shulou Information