改变emacs中的高亮线颜色 [英] Changing highlight line color in emacs

查看:463
本文介绍了改变emacs中的高亮线颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了emacs 24,并安装了前奏,我想改变主题从zenburn到探戈黑暗。但是,该行突出显示的颜色是黄色,我不喜欢。我想要它像zenburn的灰色。

I installed emacs 24 and also installed prelude and I wanted to change the theme from zenburn to tango-dark. But the color that the line is highlighted is yellow and I don't like that. I want it to be like the gray color in zenburn.

我该怎么办?我不喜欢关闭hl行,但是当我试图看到,括号()之间的空格用相同的黄色突出显示。 (在禅宗主题没有发生)。我也知道这不是探戈主题的一部分,因为当我用探戈主题运行香草emacs(sudo emacs)没有这样的突出显示。

What should I do? I prefer not to turn off the hl-line but when I tried that I saw that the space between parentheses () are highlighted with the same yellow color. (In zenburn theme that didn't happen). I also know that this is not part of the tango theme because when I run vanilla emacs(sudo emacs) with tango theme no such highlighting happens.

推荐答案

如果您自定义您的init文件(〜/ .emacs 〜/ .emacs.el 〜/ .emacs.d / init.el

That would be an easy fix if you customize your init file (~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el)

打开hl行:

(global-hl-line-mode 1)

将任何颜色设置为当前行的背景面:

Set any color as the background face of the current line:

(set-face-background 'hl-line "#3e4446")

要保持当前行中的语法突出显示:

To keep syntax highlighting in the current line:

(set-face-foreground 'highlight nil)

这篇关于改变emacs中的高亮线颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆