Cursor color in vim terminal OS X Mountain Lion

Jose187 picture Jose187 · Aug 9, 2012 · Viewed 6.9k times · Source

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.

Answer

Prince Goulash picture Prince Goulash · Aug 9, 2012

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.