我刚刚安装了realgud,这样我就可以使用trepan2在emacs中调试python了。我立即遇到了一个严重的问题:comint缓冲区中的一些颜色太浅,以至于几乎看不见:浅蓝色,甚至白色上的黄色。如何更改它们?
我尝试关闭缓冲区中的fontlock-mode,但颜色仍然存在。我也尝试过M-x customize-faces,但我不清楚realgud正在使用列出的几百个接口中的哪个。(有六个名字实际上以"Realgud“开头,但似乎没有一个相关。)我滚动了整个列表,但我没有找到任何黄色或浅蓝色的。我还试着把主题改成更深色的背景:这使得黄色可见,但之后深色就消失了。
编辑:根据lawlist的建议,以下是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似乎有许多令人痛苦的缺陷,使它们几乎无法使用。
谢谢。
发布于 2015-04-26 21:32:04
颜色映射来自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])https://stackoverflow.com/questions/27506864
复制相似问题