Reputation: 449
I want to make the cursor and selected text easier to read in vim (white background, black foreground), so i've done
hi Visual guibg=white guifg=black gui=NONE ctermfg=black ctermbg=white cterm=reverse
hi Cursor guibg=white guifg=black gui=NONE ctermfg=black ctermbg=white cterm=reverse
which gives me exactly what i want on MacVim. On the vim terminal, however, it defaults to the terminal preferences, which is very difficult to read and find...how can i override the terminal defaults?
Edit: to say that the hi Visual
like works perfectly. It's the hi Cursor
that doesn't.
Upvotes: 10
Views: 8997
Reputation: 2131
You can't change the cursor colour programatically (i.e. just do it for vim), but you can change it in Terminal>Preferences>Profiles>Text>Cursor (see image), which may solve your issue.
I find a bright green cursor makes a big difference for visibility!
EDIT: This is mentioned in the comments, but I missed that the first time so I think it deserves its own answer.
Upvotes: 10
Reputation: 15715
I am not a Mac user, but I don't believe this is possible. The cursor colour in console Vim is inherited from the terminal application, and can't be modified.* You could try changing the cursor colour in the terminal preferences.
*Disclaimer: this is certainly true of the Windows command prompt, which I am forced to use at work. It wouldn't surprise me if other Unix-like shells were more flexible.
Upvotes: 9