如何在 emacs vc-diff 中获得更多颜色?
我想让 vc-diff 对输出进行着色,以便添加的行采用一种颜色,删除的行采用另一种颜色。使用 Emacs 23.1 和 putty/xterm-256color(list-colors-display 显示 256 种颜色和颜色主题以及预期的工作)。
这是它现在的样子:
I would like to have vc-diff colorize the output so that added lines are in one color and deleted ones in another. Using Emacs 23.1 and putty/xterm-256color (list-colors-display shows 256 colors and color themes and such works as expected).
This is how it looks right now:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要仅修改添加和删除的线条的颜色:
请参阅 Trey 的答案以获取更完整的自定义。
To just modify the colors of the added and removed lines:
See Treys answer for a more complete customization.
包
diff-mode-.el
提供更多颜色。您可以通过自定义面孔
diff-indicator-removed 和
diff-indicator-added
,或者将变量diff-indicator-removed-face
和diff-indicator-add-face
更改为是您喜欢颜色/属性的面孔。还有面部和变量的变化
变体。其他用于增强
diff-mode
的软件包可以在此处找到。The package
diff-mode-.el
provides more colors.You can customize the colors by either customizing the faces
diff-indicator-removed
anddiff-indicator-added
, or changing the variablesdiff-indicator-removed-face
anddiff-indicator-added-face
to be faces whose colors/properties you like. There are alsochanged
varieties of the face and variable.Other packages for enhancing
diff-mode
can be found here.