Search code examples
vimlinehighlighttext-cursor

Don't apply highlighting on cursor


I highlighted my CursorLine with

highlight CursorLine cterm=NONE ctermbg=black ctermfg=yellow

I'd like to preserve the original highlighting for the cursor (black/white). I tried this settings:

highlight Cursor ctermbg=white ctermfg=black

which does not work.

How can I highlight the CursorLine without highlighting the cursor?


Solution

  • I just took a snoop through the vim source; there's no special handling for the cursor itself with respect to CursorLine highlighting.

    I'm not clear about the problem you're trying to solve, can you elaborate? There may be other ways to address it.