在新的Emacs 24.3中调整术语面
如何调整新Emacs中的在新的Emacs 24.3中调整术语面,emacs,emacs-faces,Emacs,Emacs Faces,如何调整新Emacs中的术语面,以获得与ansi术语颜色向量相同的控制 Emacs 24.3中的一个问题似乎是它改进了机制以控制术语缓冲区的表面,即: 变量term default fg color和term default bg color现在是 不推荐使用可自定义的面术语 您可以通过以下方式自定义如何显示ANSI端子颜色和样式: 自定义相应的术语颜色,术语颜色下划线 和术语颜色粗体面 精通Emacs的米奇: 如果像我一样,您自定义了ansi颜色名称向量,以更改 默认术语颜色我建议您现在切换到
术语
面,以获得与ansi术语颜色向量
相同的控制
Emacs 24.3中的一个问题似乎是它改进了机制以控制术语
缓冲区的表面,即:
变量term default fg color
和term default bg color
现在是
不推荐使用可自定义的面术语
您可以通过以下方式自定义如何显示ANSI端子颜色和样式:
自定义相应的术语颜色
,术语颜色下划线
和术语颜色粗体
面
精通Emacs的米奇:
如果像我一样,您自定义了ansi颜色名称向量
,以更改
默认术语颜色我建议您现在切换到使用面。这个
好消息是,你可以,应该渴望,改变的不仅仅是
每种ANSI颜色的颜色:没有任何东西可以阻止您强制
特定颜色的不同字体
与Mickey一样,我也使用了ansi颜色名称向量
,以确保我的术语
缓冲区的颜色在深色主题上看起来很好(例如探戈深色
)
但这现在会导致一个错误:
"error in process filter: Invalid face; unspecified"
在尝试使用新的面部术语
时,当我转到M-x描述面部术语
时,我看到以下内容:
[] Font Family
[] Font Foundry
[] Width
[] Height
[] Weight
[] Slant
[] Underline
[] Overline
[] Strike-through
[] Box around text
[] Inverse-video
[] Foreground
[] Background
[] Stipple
[x] Inherit
但是,如何调整这些设置以获得与使用ansi术语颜色向量所获得的效果相同的效果呢
更新
我仍然无法确定颜色。这是我为M-x定制主题探戈黑暗
获得的菜单:
以下是终端中难以看到的颜色/面之一的示例:
在Emacs 24.3中,您需要调整以下面:
;; term
`(term-color-black ((t (:foreground ,zenburn-bg
:background ,zenburn-bg-1))))
`(term-color-red ((t (:foreground ,zenburn-red-2
:background ,zenburn-red-4))))
`(term-color-green ((t (:foreground ,zenburn-green
:background ,zenburn-green+2))))
`(term-color-yellow ((t (:foreground ,zenburn-orange
:background ,zenburn-yellow))))
`(term-color-blue ((t (:foreground ,zenburn-blue-1
:background ,zenburn-blue-4))))
`(term-color-magenta ((t (:foreground ,zenburn-magenta
:background ,zenburn-red))))
`(term-color-cyan ((t (:foreground ,zenburn-cyan
:background ,zenburn-blue))))
`(term-color-white ((t (:foreground ,zenburn-fg
:background ,zenburn-fg-1))))
'(term-default-fg-color ((t (:inherit term-color-white))))
'(term-default-bg-color ((t (:inherit term-color-black))))
此代码来自的最新版本。
就我个人而言,我觉得新的定制人脸的方法是对模糊向量的改进 这对我在Emacs 24.3.1中设置术语和ansi术语的颜色很有用。只需将颜色更改为首选值(相应地调整背景) 我建议M-x
customizegroup
RETterm
RET作为定制这些颜色的最简单入口。谢谢。对于像探戈黑暗这样的主题,我有什么想法或建议吗?(即,我如何找到我的主题所支持的不同颜色?例如
zenburn-bg-1
,但对于tango dark
)只需做M-x描述主题tango dark
,并查看tango dark theme.el
中的颜色定义。谢谢@Bodzhidar。我相信你是对的,我可以按照你的步骤来解决这个问题,但不幸的是,我不知道如何使它适用于tango dark
。看起来,tango-dark
已经将ansi颜色名称向量
设置为tango-dark.el
中的给定颜色集(请参见此处的代码:http://fossies.org/unix/misc/emacs-24.3.tar.gz:a/emacs-24.3/etc/themes/tango-dark-themes.el
)。此外,当我查找M-x描述主题探戈油布时,这些颜色看起来很好(请参阅我在OP中发布的图片),但由于某些原因,它们在终端中不起作用。另一件事我不明白的是,为什么zenburn中的背景色(您在上面定义的)对于每个术语颜色都不同(它们不应该被设置为继承终端的背景色吗?)对于每种颜色,你都需要一个更亮的前景版本和一个更暗的背景版本。这就是term.el(这不是我为zenburn发明的东西)本身定义的面。term中没有直接使用这些面,它们只是用来派生其他面。
;; term
`(term-color-black ((t (:foreground ,zenburn-bg
:background ,zenburn-bg-1))))
`(term-color-red ((t (:foreground ,zenburn-red-2
:background ,zenburn-red-4))))
`(term-color-green ((t (:foreground ,zenburn-green
:background ,zenburn-green+2))))
`(term-color-yellow ((t (:foreground ,zenburn-orange
:background ,zenburn-yellow))))
`(term-color-blue ((t (:foreground ,zenburn-blue-1
:background ,zenburn-blue-4))))
`(term-color-magenta ((t (:foreground ,zenburn-magenta
:background ,zenburn-red))))
`(term-color-cyan ((t (:foreground ,zenburn-cyan
:background ,zenburn-blue))))
`(term-color-white ((t (:foreground ,zenburn-fg
:background ,zenburn-fg-1))))
'(term-default-fg-color ((t (:inherit term-color-white))))
'(term-default-bg-color ((t (:inherit term-color-black))))
;; term
(defface term-color-black
'((t (:foreground "#3f3f3f" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-red
'((t (:foreground "#cc9393" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-green
'((t (:foreground "#7f9f7f" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-yellow
'((t (:foreground "#f0dfaf" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-blue
'((t (:foreground "#6d85ba" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-magenta
'((t (:foreground "#dc8cc3" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-cyan
'((t (:foreground "#93e0e3" :background "#272822")))
"Unhelpful docstring.")
(defface term-color-white
'((t (:foreground "#dcdccc" :background "#272822")))
"Unhelpful docstring.")
'(term-default-fg-color ((t (:inherit term-color-white))))
'(term-default-bg-color ((t (:inherit term-color-black))))
;; ansi-term colors
(setq ansi-term-color-vector
[term term-color-black term-color-red term-color-green term-color-yellow
term-color-blue term-color-magenta term-color-cyan term-color-white])