命令行中的 emacs 缩进面
emacs indentation face in command line
我正在使用 emacs、elpy 和 magit 编辑 python 代码。使用 -nw 选项启动 emacs 时(来自 bash 和 gnome 3 中的 gnome-terminal)。以这种方式启动时,emacs 使用黑色背景单个字符突出显示缩进的代码块;当使用图形显示时(没有 -nw 选项),相同的字符是浅灰色的。请查看随附的两个屏幕截图:
有没有办法修改脸部的暗度以使其不那么突出?
我找到了有效的解决方案。我不确定它是否是最好的:如果有人知道更好的方法,请发表评论!
简而言之:
- 将光标放在缩进的块上;
M-x
customize-face
;
- Select默认值(
highlight-indentation-face
);
- Select
Show all
(脸继承自fringes
);
- 勾选
Background
(这将覆盖边缘背景颜色);
- 选择白色(#e5e5e5 的别名)
- 按
Apply and Save
最后一步将向 ~/.emacs 文件(linux)写入几行以保留自定义值。在我的系统中,添加的行是:
(custom-set-variables)
(custom-set-faces
'(highlight-indentation-face ((t (:inherit fringe :background "white")))))
我正在使用 emacs、elpy 和 magit 编辑 python 代码。使用 -nw 选项启动 emacs 时(来自 bash 和 gnome 3 中的 gnome-terminal)。以这种方式启动时,emacs 使用黑色背景单个字符突出显示缩进的代码块;当使用图形显示时(没有 -nw 选项),相同的字符是浅灰色的。请查看随附的两个屏幕截图:
有没有办法修改脸部的暗度以使其不那么突出?
我找到了有效的解决方案。我不确定它是否是最好的:如果有人知道更好的方法,请发表评论!
简而言之:
- 将光标放在缩进的块上;
M-x
customize-face
;- Select默认值(
highlight-indentation-face
); - Select
Show all
(脸继承自fringes
); - 勾选
Background
(这将覆盖边缘背景颜色); - 选择白色(#e5e5e5 的别名)
- 按
Apply and Save
最后一步将向 ~/.emacs 文件(linux)写入几行以保留自定义值。在我的系统中,添加的行是:
(custom-set-variables)
(custom-set-faces
'(highlight-indentation-face ((t (:inherit fringe :background "white")))))