Emacs colors. why it is gray on current line? zenburn theme

依然范特西╮ 提交于 2019-12-23 18:52:57

问题


I installed Prelude on my emacs24. I'm using ubuntu 12.04

It worked perfectly the first time I used it, but all the next times it doesn't. On my current line the font color is gray so it's hard to see what I write. Previously it was a Bold case, keeping any color the line had for reserved words.

How can I fix this?

or also the empty lines with spaces are all yellow

I've been trying to fix it on the: ~/.emacs.d/elpa/zenburn-theme-20130716.1457/zenburn-theme.el file but I can't find a solution... I think the problem could be between this lines:

;;;;; hl-line-mode

`(hl-line-face ((,class (:background ,zenburn-bg-05)) (t :weight bold)))
`(hl-line ((,class (:background ,zenburn-bg-05)) ; old emacsen (t :weight bold)))

Thanks!


回答1:


You can change the background and foreground to whatever you want, or turn it off completely. You can add bold or underline or overline or slant, or whatever floats your boat. One of my very first projects was to take the settings from color-theme and put it into my .emacs file and I haven't used a specific color theme since. Oh, and of course you want to open your .emacs or init file to see if there are any settings that conflict with the color theme you are using.

(global-hl-line-mode 1)  ;; highlight current line -- see hl-line.el

(custom-set-faces
  '(highlight ((t (:background "grey80" :foreground "black" :bold t)))) ;; highlight current line
)



回答2:


Important: Add to .bashrc file:

export TERM=xterm-256color

and I found the perfect configuration for me. Here it goes:

;;;;; hl-line-mode                                                              

   (custom-set-faces
  '(highlight ((t (:background "grey20" :foreground nil :bold t)))) ;; highligh\
t current line                                                                  
)

This way you keep every color for reserved words all bold and a gray background for the current line. Everything will be beautiful =)



来源:https://stackoverflow.com/questions/17842144/emacs-colors-why-it-is-gray-on-current-line-zenburn-theme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!