修改Emacs中的ansi-term颜色

时间:2014-02-07 18:39:04

标签: emacs colors terminal ansi-escape ansi-term

下面红色椭圆中的文字难以阅读

enter image description here

当我用C-u C-x =(脸部)检查脸部时,我看到以下内容:

enter image description here

所以我去更新了脸term-bold(见下文),但颜色似乎与我上面的屏幕上的颜色不一致(根据脸部定义,它应该是蓝色+黄色) 。有什么想法吗?

enter image description here

3 个答案:

答案 0 :(得分:5)

Emacs使用自己的终端颜色来渲染ansi颜色代码。您可以通过更改两个面来更改您所指的面部的外观:

  • term-color-yellow
  • term-color-blue

例如,将面部term-color-yellow的前景属性更改为yellow3,将面部term-color-blue的背景属性更改为dark-blue会导致以下外观:< / p>

enter image description here

比原始帖子中的脸部更具可读性,类似于蓝色和黄色终端颜色的传统外观。

答案 1 :(得分:3)

它告诉你,脸部term-bold继承了,然后覆盖了继承的foregroundbackgroundinverse-video属性

我猜这些颜色来自shell(我认为它是一个shell),你正在那个终端中运行。所以你可能需要在Emacs之外配置颜色?

答案 2 :(得分:1)

最有效的方法是使用Emacs定制组

M-x customize-group RET term RET

这将打开

enter image description here