Improve vimdiff syntax highlighting
Asked Answered
E

1

7

When I run vimdiff I get a pretty bad syntax highlighting (unreadable):

enter image description here

Running on MacVim is a little bit better, but still awful.

Is this because of my color scheme (currently using Tomorrow Night)?

If so, is there a way to modify the colours used in vimdiff outside the theme, or maybe install another ftplugin that supports this better (not sure about this as set filetype shows vim instead of diff or similar)?

Evan answered 10/7, 2014 at 2:27 Comment(0)
G
8

Its the color scheme. You would need to modify DiffAdd, DiffChange, DiffDelete, and DiffText. These are the standard highlight groups. The diff syntax file also supports more highlight groups. These groups can be found at the bottom of $VIMRUNTIME/syntax/diff.vim these default to standard highlight groups. However these colors will only affect the diff filetype.

You can modify the color scheme by using the after directory. Put changes in ~/.vim/after/colorscheme/<colorscheme_name>.vim these will get sourced after the color scheme is set.


(Personally I haven't found any colors I've liked for vimdiff)

Glycoprotein answered 10/7, 2014 at 3:0 Comment(1)
Thanks a lot. Was able to get to something nice.Evan

© 2022 - 2024 — McMap. All rights reserved.