改进vimdiff语法突出显示 [英] Improve vimdiff syntax highlighting

查看:240
本文介绍了改进vimdiff语法突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行vimdiff时,我得到了一个非常糟糕的语法突出显示(不可读):

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

在MacVim上运行会更好一些,但仍然很糟糕.

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

这是因为我的配色方案(当前使用的是Tomorrow Night)吗?

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

如果是这样,是否可以在主题之外修改vimdiff中使用的颜色,或者可以安装另一个更好地支持此颜色的ftplugin(不确定,因为set filetype显示的是vim而不是diff或类似)?

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

推荐答案

它是配色方案.您将需要修改DiffAdd,DiffChange,DiffDelete和DiffText.这些是标准的高光组. diff语法文件还支持更多的突出显示组.这些组可以在$VIMRUNTIME/syntax/diff.vim的底部找到,这些默认为标准突出显示组.但是,这些颜色只会影响diff文件类型.

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.

您可以使用after目录修改配色方案.将更改放入~/.vim/after/colorscheme/<colorscheme_name>.vim中,这些更改将在设置配色方案后获取.

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.

(我个人没有找到我喜欢的vimdiff颜色)

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

这篇关于改进vimdiff语法突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆