The background of the first column of all rows in vim turns dark blue, how to restore it to normal?
ringa_lee
ringa_lee 2017-05-16 16:41:38
0
6
711

The color scheme is set to colorscheme desert

It seems that after executing a command like: 4,11s/^/#/g, it will look like the picture below.

This problem exists in both normal and editing modes.

How can I get back to normal?

===============

According to weakish's reply, the highlighting is caused by the content selected by the replacement command highlighting, so just use set nohls.
However, let @/ ="" also has the same effect. Can you explain the meaning of this sentence?

ringa_lee
ringa_lee

ringa_lee

reply all (6)
Ty80

This is normal behavior. Because you executed:4,11s/^/#/g, this operation is to match the beginning of the line, so all lines will be highlighted.

Enter the following command to cancel highlighting.

:let @/ = ""

If you never want to see highlighted search results, then delete the following line in.vimrc.gvimrc

set hls
    世界只因有你

    :let @{reg-name} = {expr1}:let-register:let-@
    Write the result of the expression {expr1} in register
    {reg-name}. {reg-name} must be a single letter, and
    must be the name of a writable register (see
    |registers|). "@@" can be used for the unnamed
    register, "@/" for the search pattern.
    If the result of {expr1} ends in a or , the
    register will be linewise, otherwise it will be set to
    characterwise.
    This can be used to clear the last search pattern: >
    :let @/ = ""
    < This is different from searching for an empty string,
    that would match everywhere.

    这是vim的帮助文档,相信你能看懂吧:This can be used to clear the last search pattern

      左手右手慢动作

      :nohl

      xxxxxxxxxxxxxxxxxxxxxxxxx

        某草草

        no high light search
        :nohls

          大家讲道理

          :noh Enter
          Unhighlight found results.

            为情所困

            If I use it, I just search for a random string. There is no need to remember such details as: /sadjfldsjglkfdjgh so that the first line will not be highlighted.

              Latest Downloads
              More>
              Web Effects
              Website Source Code
              Website Materials
              Front End Template
              About us Disclaimer Sitemap
              php.cn:Public welfare online PHP training,Help PHP learners grow quickly!