Question

I recently updated my iTerm color scheme and when I make a selection in visual mode (using vim) the color is awful. iTerm has some color options for Selection and Selection text what I would like to use as guibg and guifg respectivly. I tried this in my vim config but couldn't get it to work.

hi Visual  guifg=SelectionText guibg=Selection

Is this possible to do?

Was it helpful?

Solution

As far as I know, the colors used for text, background, selection and friends are not exported by iTerm so what you want is out of reach.

Instead, use the same color you used in the settings window, converted to its nearest neighbor in the xterm palette.

Also, you are supposed to use ctermbg and ctermfg as guibg and guifg are, obviously, for GUI Vim and thus wrong and useless in your situation.

Example:

hi Visual ctermfg=16 ctermbg=67
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top