我在更改ansi-term(以及term - 但shell没问题)的背景颜色时遇到了问题。它可以从输出中正确显示颜色,但输出的背景颜色始终为白色。不是整个缓冲区,而只是实际输出字符下方的部分。如果我执行以下操作:
(add-hook 'ansi-term-mode-hook
(lambda ()
(set-background-color "purple")))
这会改变缓冲区的背景颜色,但输出只是用自己的背景颜色——白色覆盖它。
我还试图找到它正在使用的面孔,所以我可以通过执行C-u C-x =
来获取有关点处面孔的信息进行自定义——这对其他所有内容都有效,甚至指出了你要更改的位置,非常好……但在ansi终端中,我得到了这个:
character: m (109, #o155, #x6d)
preferred charset: ascii (ASCII (ISO646 IRV))
code point: 0x6D
syntax: w which means: word
category: .:Base, a:ASCII, l:Latin, r:Roman
buffer code: #x6D
file code: #x6D (encoded by coding system utf-8)
display: by this font (glyph code)
xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x50)
Character code properties: customize what to show
name: LATIN SMALL LETTER M
general-category: Ll (Letter, Lowercase)
There are text properties here:
face (:background "white" :foreground "black")
[back]
我不知道这是在哪里设置的。 face (:background "white" :foreground "black")
另外,我使用过多个主题,我知道它们都有ansi-term-color-vector(例如zenburn等)。我已经查看了customize-face中的每个示例,但仍然找不到它。
有没有想法如何覆盖/设置此内容,使其与其他内容一样具有透明(或未设置)的背景?
感谢您的帮助。
(setq term-default-bg-color nil)
,以获得我想要的效果。 非常感谢,不确定如何为您标记。 - user397544