Improve vimdiff syntax highlighting

人走茶凉 提交于 2019-12-10 17:23:15

问题


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

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)?


回答1:


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)



来源:https://stackoverflow.com/questions/24666558/improve-vimdiff-syntax-highlighting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!