lunacookies/vim-colors-xcode

Same line diffs are hard to make of

bitigchi opened this issue · 10 comments

Hello,

Please see below screenshot:

screenshot

The diff part could use a little more background highlighting IMO. It might be my iTerm, I'm not sure as well.

It looks like you aren’t running with True Colour. Can you try running set termguicolors?

It all went grey after set termguicolors.

It all went grey after set termguicolors.

Sounds like your environment does not support True Color. Can you try with a new iTerm profile without tmux or anything like that, with the terminal type set to xterm-256color (change that from iTerm > Preferences… > Profiles > > Terminal > Terminal Emulation > Report terminal type), with an up-to-date Vim with only this in the config:

filetype plugin indent on
syntax enable

set termguicolors
colorscheme xcodedark

Can you also make sure that you don’t have anything like export TERM=xyz in your shell configuration, because the terminal emulator is meant to do that itself and might mess it up.

Well, this is weird, because my terminal is/was already set to 256 colours. iTerm2 settings are fine, and this was my .vimrc regarding colour and syntax. I tried with a new profile and the results were the same.

if &t_Co > 1
	syntax enable
endif
colorscheme xcodedark
set t_Co=256

Do you get a different highlighting with a same line diff?

Here is what diffing looks like with True Colour working properly:

Screen Shot 2020-02-09 at 9 30 44 pm

This is what the same text looks like with True Colour disabled:

Screen Shot 2020-02-09 at 9 34 41 pm

set t_Co=256

This is a Bad Idea because it forces Vim to use the limited 256-colour palette rather than something else. Vim works out what colour palette it has available automatically and makes use of it. Did you remove this line during testing?

Just for purposes of demonstration, here is the famous Solarized colourscheme with True Colour:

and here it is without:

Screenshots from solarized8.

Alright, I tried some stuff:

This is without termguicolors, left tmux, right iTerm2 (xterm-256)
left-tmux right-plainiterm2

This is with termguicolors, left tmux, right iTerm2 (xterm-256)
left-tmux right-plainiterm2 - 2

I'm sorry this is turning into something other than diff highlighting. :)

Okay, update. This one worked, and the colours are much more beautiful now. I can get proper orange line highlighting in iTerm2, but not in tmux, I'm gonna poke that a little bit more now! Closing, and thanks for the assistance. Nice!

Edit: After an iTerm restart, tmux works fine too!

tmux works fine too!

Glad you managed to get it working in your preferred environment!