onehalf icon indicating copy to clipboard operation
onehalf copied to clipboard

Background color in VIM not matching iTerm

Open knuti opened this issue 4 years ago • 2 comments

Theoretically re-opening this one here.

I would like to match the colors between VIM and iTerm as well.

Played a bit around and found inside "../../onehalf/vim/colors/onehalfdark.vim" let s:black = { "gui": "#282c34", "cterm": "236" }

I changed it to let s:black = { "gui": "#000000", "cterm": "0" } and it seems to work. Might not be the correct color like defined for iterm colors, but would be lovely to see it match by default.

Appreciate your great efforts in that project and really like the theme. Thanks

knuti avatar Feb 11 '20 19:02 knuti

Hey glad you like the colors!

I haven't really had time to revisit these issues, but just want to leave a clarifying comment here for posterity.

For vim, you need to have these things setup:

  • vim with true color mode support (otherwise it will fallback to 256 colors)
  • if you run vim within a terminal multiplexer such as screen or tmux, it needs to support passing them through as well
  • your terminal emulator also needs to support true colors

It was a long time ago, but I remember that iTerm was kinda quirky that the colors somehow got slightly adjusted after setting them and never match 100%...

I have some plans to revisit these issues though, will dig back into these when I have time :)

sonph avatar Apr 23 '20 07:04 sonph

For anyone coming around this issue, adding set termguicolors in my vimrc seemed to fix this.

talbii avatar Nov 04 '23 20:11 talbii