How to highlight cursor line in VIM?

VIM can be configured to highlight the current line using the :hi cursorline guibg=green commands :hi cursorline guibg=green and set cursorline . But if I turn on the display of tabs with:

 :hi specialkey guifg=grey guibg=grey :set listchars="tab" :set list 

The output of the cursor line will damage the tab display:

alt text http://dl.dropbox.com/u/239055/vim_cursorline_bug.png

Any hints, how can I avoid damage, so that the tabs are highlighted in one color and the cursor line is highlighted in a different color without displaying ^I at the intersection?

+4
source share
1 answer

Try installing listchars without quotes:

 :set listchars=tab:>- 

This shows the tab as >------- instead of ^I , and I think this is what you asked for. When the cursor is in a cursorline row, the entire row is displayed in cursorline color.

The cursorline color cursorline take precedence over the specialkey color, which is consistent with your screenshot.

+4
source

Source: https://habr.com/ru/post/1308216/


All Articles