In Vim can you stop the color change of white space characters with 'set cursorline' on?

前端 未结 4 696
鱼传尺愫
鱼传尺愫 2021-02-04 06:33

In this Vim screenshot you can see that when moving the cursor over a line it changes the normal color of the whitespace characters (shown on the left) from grey to black. Can I

4条回答
  •  抹茶落季
    2021-02-04 06:57

    Following lines in .vimrc fixed the problem for me.

    au VimEnter * call matchadd('SpecialKey', '^\s\+', -1)
    au VimEnter * call matchadd('SpecialKey', '\s\+$', -1)
    

    It overrides other styles application for tabs and trailing spaces inside a cursor line.

提交回复
热议问题