Ame*_*ina 12 emacs emacs-faces
如何调整term新Emacs中的面部以获得可能的控制ansi-term-color-vector?
Emacs 24.3中的一个新功能似乎是它改进了控制term缓冲区面的机制,即:
变量
term-default-fg-color和term-default-bg-color现在弃用,取而代之的定制脸term.您可以自定义如何通过定制相应的显示ANSI终端的颜色和样式
term-color-COLOR,term-color-underline和term-color-bold面孔.
来自Mastering Emacs的Mickey 评论如下:
如果像我一样,您自定义
ansi-color-names-vector更改默认术语颜色,我建议您现在切换到使用面部.这里的好消息是,您可以,应该更改,而不仅仅是为每种ANSI颜色更改颜色:没有什么能阻止您为某些颜色强制使用不同的字体
像米奇一样,我也ansi-color-names-vector用来确保term缓冲区的颜色在黑暗主题上看起来很好(例如tango-dark)
(setq ansi-term-color-vector [unspecified “black” “red3” “lime green” “yellow3” “DeepSkyBlue?3” “magenta3” “cyan3” “white”])
Run Code Online (Sandbox Code Playgroud)
但现在这会导致错误:
"error in process filter: Invalid face; unspecified"
Run Code Online (Sandbox Code Playgroud)
为了尝试使用新面孔term,当我去的时候M-x describe-face term,我看到以下内容:
[] Font Family
[] Font Foundry
[] Width
[] Height
[] Weight
[] Slant
[] Underline
[] Overline
[] Strike-through
[] Box around text
[] Inverse-video
[] Foreground
[] Background
[] Stipple
[x] Inherit
Run Code Online (Sandbox Code Playgroud)
但是如何调整这些设置以获得我使用的相同效果ansi-term-color-vector?
我仍然无法修复颜色.这是我得到的菜单M-x customize-theme tango-dark:

这是一个很难看到的终端中的一个颜色/面的示例:

bob*_*bob 10
这在Emacs 24.3.1中对我有用,可以设置术语和ansi-term的颜色.只需将颜色更改为您的首选值(相应地调整背景).
;; 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])
Run Code Online (Sandbox Code Playgroud)
在 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))))
Run Code Online (Sandbox Code Playgroud)
此代码来自Zenburn的最新版本。就我个人而言,我认为自定义面部的新方法是对使用模糊向量的改进。
| 归档时间: |
|
| 查看次数: |
4203 次 |
| 最近记录: |