我刚刚安装了realgud
,以便我可以使用trepan2
在emacs中调试python。我立即遇到了一个严重的问题:comint
缓冲区中的一些颜色很浅,几乎看不见:浅蓝色甚至是白色的黄色。我该如何改变它们?
我尝试关闭缓冲区中的fontlock-mode
,但颜色仍然存在。我也尝试了M-x customize-faces
,但对于realgud
使用的数百张面孔中的哪一张来说,我并不明白。 (有六个人的名字实际上以“Realgud”开头,但它们似乎都没有相关性。)我滚动整个列表,我找不到任何黄色或浅蓝色的。我也尝试将主题改为背景较暗的东西:使黄色可见,但黑暗的颜色消失了。
编辑:遵循法律清单的建议,以下是C-u C-x =
的结果。如果我理解这一点,那就意味着黄色是硬编码的。
position: 8445 of 9070 (93%), column: 39
character: 0 (displayed as 0) (codepoint 48, #o60, #x30)
preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x30
syntax: w which means: word
category: .:Base, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
buffer code: #x30
file code: #x30 (encoded by coding system utf-8-unix)
display: by this font (glyph code)
x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 (#x30)
Character code properties: customize what to show
name: DIGIT ZERO
general-category: Nd (Number, Decimal Digit)
decomposition: (48) ('0')
There is an overlay here:
From 8437 to 8450
face (foreground-color . "yellow")
modification-hooks (ansi-color-freeze-overlay)
There are text properties here:
field output
fontified t
front-sticky (field inhibit-line-move-field-capture)
inhibit-line-move-field-capture t
rear-nonsticky t
[back]
老实说,无论如何,我对realgud
失去了兴趣。虽然增强pdb
的想法听起来不错,但trepan2
和realgud
似乎有多个痛苦的缺陷,使它们几乎无法使用。
感谢。
答案 0 :(得分:1)
颜色映射来自ansi-term
。
这是我在.emacs中的内容,但请注意我使用浅色(白色)背景。请注意,虽然主要设置为ansi-term-color-vector
,但必须事先确定颜色定义。
(defface term-color-darkgreen
'((t :foreground "DarkGreen" :background "DarkGreen"))
"Face used to render dark green color code."
:group 'term)
(defface term-color-cadetblue
'((t :foreground "CadetBlue" :background "CadetBAlue"))
"Face used to render dark cadet blue color code."
:group 'term)
(defface term-color-purple
'((t :foreground "Purple" :background "Purple"))
"Face used to render dark Purple color code."
:group 'term)
(defface term-color-darkgoldenrod
'((t :foreground "Darkgoldenrod" :background "Darkgoldenrod"))
"Face used to render dark Darkgoldenrod color code."
:group 'term)
(defface term-color-ivory4
'((t :foreground "Ivory4" :background "Ivory4"))
"Face used to render dark Ivory4 color code."
:group 'term)
(setq ansi-term-color-vector
[term
term-color-black
term-color-red
term-color-darkgreen
term-color-cadetblue
term-color-blue
term-color-purple
term-color-darkgoldenrod
term-color-ivory4])