[vim/vim] indistinguishable colors in vimdiff mode (#4071)

50 views
Skip to first unread message

bam80

unread,
Mar 5, 2019, 8:44:55 AM3/5/19
to vim/vim, Subscribed

Got this as fugitive's :Gdiff result. I can't read text in diffs:
image

It's standard Vim 7.4 in Plasma's Konsole.
Maybe default diffs colors could be more appropriate?
#2044


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Christian Brabandt

unread,
Mar 5, 2019, 9:03:04 AM3/5/19
to vim/vim, Subscribed

have you checked the settings from the linked issue number?

bam80

unread,
Mar 5, 2019, 9:06:00 AM3/5/19
to vim/vim, Subscribed

@chrisbra thanks for the respond. Seems correct:

  t_Co=256
  background=dark

bam80

unread,
Mar 5, 2019, 11:04:15 AM3/5/19
to vim/vim, Subscribed

Any other advise?

bam80

unread,
Mar 10, 2019, 6:40:36 PM3/10/19
to vim/vim, Subscribed

So it seems definitely the problem of the default color scheme.
Changing the scheme solves the problem.
But, the default should be fixed I think.

Andy Harrison

unread,
Mar 15, 2019, 8:29:46 AM3/15/19
to vim/vim, Subscribed

The simplest thing to do is shut off syntax highlighting.
:syn off
Personally, I think it should be automatically set to off upon entering diff mode. You end up with two different sets of highlighting competing with each other, the highlighting for the file type and the highlighting for diff mode itself. It's always unreadable and the first thing I do every time I use diff mode is :syn off.

bam80

unread,
Mar 15, 2019, 9:04:44 AM3/15/19
to vim/vim, Subscribed

Others schemes work without turning off the syntax highlighting, so I doubt if it's a good solution.
But thanks anyway.

lacygoill

unread,
Dec 21, 2020, 8:55:05 AM12/21/20
to vim/vim, Subscribed

Personally, I think it should be automatically set to off upon entering diff mode. You end up with two different sets of highlighting competing with each other, the highlighting for the file type and the highlighting for diff mode itself. It's always unreadable and the first thing I do every time I use diff mode is :syn off.

FWIW, I agree. That's why I ask Vim to clear the syntax when I'm in diff mode:

augroup NoSyntaxInDiffMode | au!
    au OptionSet diff exe v:option_new == '1' ? 'syn clear' : 'do Syntax'
    au VimEnter * IfDiffSynClear()
    :def IfDiffSynClear()
        if !&l:diff | return | endif
        getwininfo()->map({_, v -> win_execute(v.winid, 'syn clear')})
    enddef
augroup END


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

Gary Johnson

unread,
Dec 21, 2020, 3:30:34 PM12/21/20
to reply+ACY5DGDRTWU4MSEVAF...@reply.github.com, vim...@googlegroups.com
On 2020-12-21, lacygoill wrote:
> Personally, I think it should be automatically set to off upon entering
> diff mode. You end up with two different sets of highlighting competing
> with each other, the highlighting for the file type and the highlighting
> for diff mode itself. It's always unreadable and the first thing I do every
> time I use diff mode is :syn off.
>
> FWIW, I agree. That's why I ask Vim to clear the syntax when I'm in diff mode:
>
> augroup NoSyntaxInDiffMode | au!
> au OptionSet diff exe v:option_new == '1' ? 'syn clear' : 'do Syntax'
> au VimEnter * IfDiffSynClear()
> :def IfDiffSynClear()
> if !&l:diff | return | endif
> getwininfo()->map({_, v -> win_execute(v.winid, 'syn clear')})
> enddef
> augroup END

I have a similar autocommand that sets syn=OFF whenever 'diff' is
set, but I also save the syntax state and restore it when 'diff' is
unset.

Regards,
Gary

vim-dev ML

unread,
Dec 21, 2020, 3:30:59 PM12/21/20
to vim/vim, vim-dev ML, Your activity


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

Maxim Kim

unread,
Dec 22, 2020, 2:26:56 AM12/22/20
to vim_dev
We try to address that issue with reimplementation of built-in colorschemes (desert, for example https://github.com/vim/colorschemes/pull/50), but `default` one is out of the scope as there is no default colorscheme.

I think it would be nice to add `guifg` and `ctermfg` to Diff(Text|Change|Add).

Reply all
Reply to author
Forward
0 new messages