简体   繁体   English

如何在终端缓冲区的GUI Emacs 24中获得256色?

[英]How to get 256 colors in GUI Emacs 24 in terminal buffer?

I installed Emacs on a Mac via brew install emacs --cocoa --srgb . 我通过brew install emacs --cocoa --srgb在Mac上brew install emacs --cocoa --srgb

GUI Emacs itself is running fine. GUI Emacs本身运行良好。 I'm able to use any color theme I want with it. 我可以使用任何我想要的颜色主题。 However, when I start a terminal buffer with either term or ansi-term , and I run tput colors , I only get 8. Trying to display all 256 ANSI colors via a bash script gets me just the basic 8 colors. 但是,当我使用termansi-term启动终端缓冲区,并且运行tput colors ,我只能得到8。 尝试通过bash 脚本 显示所有256种ANSI颜色只能得到8种基本颜色。

If I run list-colors-display , I get the basic 8 plus some theming colors , but not 256. 如果我运行list-colors-display ,我会得到基本的8种颜色以及一些主题颜色 ,但不是256种。

This is the GUI version of Emacs, which brings up its own window, so I don't think it has anything to do with the Terminal. 这是Emacs的GUI版本,它显示了自己的窗口,因此我认为它与终端没有任何关系。 But when I run the same script in Terminal to display the ANSI colors, I do get all 256, and tput colors in Terminal gives me 256, so I know it's not the script's problem. 但是, 当我在Terminal中运行相同的脚本以显示ANSI颜色时,我确实得到了全部256 tput colors ,而Terminal中的tput colors使我得到了256 tput colors ,因此我知道这不是脚本的问题。

Did I miss something? 我错过了什么? Where can I go from here to get 256 colors working in the terminal buffer on GUI Emacs? 我从哪里可以到GUI Emacs的终端缓冲区中获得256种颜色?

您什么都不会错过,也没有路可走: termansi-term都不支持256色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM