我可以调整每种模式的颜色主题吗?
我使用的是 Ubuntu 11.04 中的 Emacs 23.2.1。我已经安装了 purcell 的 Solarized 颜色主题端口,但我想调整一些使我的 Python 缓冲区看起来更像Solarized Vim 屏幕截图。编辑颜色主题非常容易,以便始终使用我喜欢的颜色,但这也会在 C 模式下更改它们,我想避免这种情况。
具体来说,这是builtin-face的默认设置:
(font-lock-builtin-face ((t (:foreground ,green))))
在Python模式下 - 并且仅在Python模式下 - 我想使用它:
(font-lock-builtin-face ((t (:foreground ,blue))))
我理想地希望通过将一些逻辑修补到颜色主题定义中来进行此更改,以便我可以将我的调整发送到上游,并附上注释“这仅改变了 Python 突出显示”。如果做不到这一点,我会在我的 init.el
中解决一些问题。不过,我更愿意将它与主要颜色主题一起打包。
这可能吗?刮掉那个。这是 Emacs;我知道这是可能的!但我该怎么办呢?
I'm using Emacs 23.2.1 from Ubuntu 11.04. I've installed purcell's port of the Solarized color-theme, but I'd like to adjust some of the faces to make my Python buffers look more like the Solarized Vim screenshot. It's easy enough to edit the color-theme so that my preferred colors are always used, but that would also change them in C mode and I want to avoid that.
Specifically, here's the default setting for the builtin-face:
(font-lock-builtin-face ((t (:foreground ,green))))
In Python mode - and only Python mode - I'd like to use this instead:
(font-lock-builtin-face ((t (:foreground ,blue))))
I'd ideally like to make this change by patching some logic into the color-theme definition so that I can send my adjustments upstream with a note saying "this changes just the Python highlighting". Failing that, I'd settle for something in my init.el
. I'd much rather have it packaged with the main color-theme, though.
Is this possible? Scratch that. This is Emacs; I know it's possible! But how can I do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用面部重映射应该可以实现这一点。即使您更喜欢修补颜色主题定义,我还是建议将类似以下几行的内容放入您的
init.el
文件中,因为这是一种更“标准”的方式事物:This should be possible using Face Remapping. Even though you prefer to patch up the color-theme definition, I'd argue for putting something like the following lines into your
init.el
file, as it is a more "standard" way of doing such things: