在 Emacs 中修改光标下的面,包括在 ansiterm 上

Ame*_*ina 3 emacs ipython emacs-faces

有没有办法轻松修改font-face下光标?

例如,下面的蓝色文字很难阅读:

                           在此输入图像描述

上面是输出

ipython --color "Linux"
Run Code Online (Sandbox Code Playgroud)

ansi-term在with tango-darkin上运行Emacs 24.1,即 (load-theme 'tango-dark t)

如果我what-cursor-position在上面的图像上运行(此处描述:在 Emacs 中获取光标下的字体),我得到:

             position: 30385 of 30477 (100%), column: 22
            character: / (displayed as /) (codepoint 47, #o57, #x2f)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x2F
               syntax: _    which means: symbol
             category: .:Base, a:ASCII, l:Latin, r:Roman
          buffer code: #x2F
            file code: #x2F (encoded by coding system nil)
              display: by this font (glyph code)
    xft:-unknown-DejaVu LGC Sans Mono-bold-normal-normal-*-11-*-*-*-m-0-iso10646-1 (#x12)

Character code properties: customize what to show
  name: SOLIDUS
  old-name: SLASH
  general-category: Po (Punctuation, Other)
  decomposition: (47) ('/')

There are text properties here:
  face                 (:weight bold :foreground "blue2" :background unspecified)
Run Code Online (Sandbox Code Playgroud)

我该如何修改这个字体?

如果您想知道 IPython 只支持三种颜色集:

  • Nocolor
  • Linux(我上面用的那个)
  • LightBG(适用于浅色背景)

更新:

我认为font-lock-string-face是一张不同的脸:

                        在此输入图像描述

事实上,我认为这不是 IPython 用于表示字符串的面孔,而是python-mode用于通过常规 Python 代码(在 参考资料中)表示缓冲区中的字符串的面孔tango-dark- 见下文 -。

                                          在此输入图像描述

Jes*_*mos 5

M-x customize-face将光标放在要修改的特定内容上。还可以使用set-face-foreground和 ,set-face-background具体取决于您想要执行的操作(有时最好更改背景颜色以使字体在终端中更容易看到)。

因此,我检查了下面评论中提到的 IPython,并且ipython.el没有突出显示它自己。着色全部通过使用终端 ANSI 颜色来完成。在某些终端中,可以通过.bashrc.zshrc或任何您的 shell 来更改颜色并从中运行它M-x term。通过 Emacs 本身,我看不到更改它的方法,因为 IPython 只有 3 个默认方案,据我所知,没有办法指定任何特定的内容。