【发布时间】:2013-04-11 10:14:19
【问题描述】:
我最近从 Geany 迁移到 Emacs,我想自定义 Emacs 中的空白字符,使其看起来像 Geany 中的那样。
在 Geany 中,这些点很小且呈灰色:
在 Emacs 中,点更大且更白:
我发现 Geany 中的点在眼睛上要轻得多。
解决方案
在我从我的 .emacs 文件中评论 (setq whitespace-style (quote (spaces tabs newline space-mark tab-mark newline-mark))) 后问题解决了:
;; make whitespace-mode use just basic coloring
;;(setq whitespace-style (quote (spaces tabs newline space-mark tab-mark newline-mark)))
(setq whitespace-display-mappings
;; all numbers are Unicode codepoint in decimal. ⁖ (insert-char 182 1)
'(
(space-mark 32 [183] [46]) ; 32 SPACE 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」
(newline-mark 10 [182 10]) ; 10 LINE FEED
(tab-mark 9 [9655 9] [92 9]) ; 9 TAB, 9655 WHITE RIGHT-POINTING TRIANGLE 「▷」
))
空白字符现在看起来完全符合预期。
【问题讨论】:
-
您可以将
face添加到whitespace-style列表中,而不是评论该行。
标签: emacs colors whitespace