如何在空白模式下将空格 - 制表符的面改为Emacs中的红色背景

时间:2014-02-25 10:18:48

标签: emacs colors

我的.emacs文件中包含此代码:

(setq-default show-trailing-whitespace t)
(setq whitespace-style '(face tabs))
(whitespace-mode)

如何更改var whitespace-tab以使我的标签看起来与尾随空格(红色背景)相同?

2 个答案:

答案 0 :(得分:1)

找到它,需要使用这段代码:

(setq whitespace-style '(face tabs))
(setq tab-face (make-face 'tab-face))
(set-face-background 'tab-face "red")
(setq whitespace-tab 'tab-face)
(whitespace-mode)

答案 1 :(得分:1)

另一种选择:不要为whitespace-mode而烦恼。 使用库highlight-chars.el(请参阅your related question),然后只需自定义面hc-tabM-x customize-face hc-tab)。

相关问题