1

I've tried setting the highlight rules below but it does not work. Whatever color I choose, the color of the character stays the same.

I'm using xfce4-terminal on Linux and Terminal.app on Mac OSX.

Both have an option to define the color of the block cursor.

highlight Cursor cterm=NONE ctermfg=9 highlight lCursor cterm=NONE ctermfg=9 

There is no color scheme set up (just terminal colors).

1
  • 1
    I am not sure of Terminal.app, but in case of normal terminal emulators, those highlight groups you mentioned works only for graphical vim (gVim), not terminal vim. And no, it doesn't work with guifg either. It needs gVim. If you want explanation, I can try and find what's happening. But i'm assuming you aren't interested. Commented Jan 16, 2022 at 4:33

1 Answer 1

2

This is only supported in GUI. For terminal, there is no common way to set it up.

If you really need setting cursor colors, you have to figure the right control sequence yourself and tell Vim about it. Full instructions and working example for xterm-compliant terminal are given under :h termcap-cursor-color.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.