Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to search the setting highlight for vim in Linux

Shulou Source: shulou.com Published: 2022-06-02 01:49:29 10月01日 Update

It is believed that many inexperienced people don't know what to do about how to search the vim setting highlight in Linux. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Vim search Settings highlight

When linux vim opens the document search string, the settings are searched to highlight the string.

There are two ways:

1. Temporary settings: vim opens the document-- > enter set hlsearch on the command line.

Disadvantages: after closing the document, the next time you open it, you need to reset it again.

2. Permanent setting (recommended): configure in ~ / .vimrc

Vim / .vimrc

Set nuset tabstop=4set shiftwidth=4set autoindentset expandtabset titleset hlsearch

Source / .vimrc

Then save and exit.

Advantages: one-time setting, permanent effect.

After reading the above, have you mastered how vim searches for highlights in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Search highlight document method content character string more problem permanent helpless to this end advantages reasons commands this form skills articles experience Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Redmi Linux MySQL