Emacs' hl-line-mode is just what i need but i would like to change it's horrible yellow color, anyone know how can i do that开发者_开发问答?
I use (set-face-background hl-line-face "gray13")
.
here's what it looks like with a black background.
Very subtle. Mostly I notice it when moving the cursor, which is what I wanted.
If you want to see a display of all the various colors, try (list-colors-display)
. It will show a list of colors in a new buffer.
EDIT: heh heh, since I am getting upvoted for pretty pictures, here it is "live":
(ps: that animated gif was produced with the Cropper tool and the AnimatedGif plugin.)
M-x customize-group
RET hl-line
RET
and modify "Hl Line face".
Alternatively, you could use (for example):
(set-face-background 'hl-line "#333333")
edit: cheeso's answer would be the more robust approach for that second version.
On top of all the nice answers, you can also do it with use-package
as follows:
(use-package hl-line
:custom-face
(hl-line ((t (:background "#aaaaaa")))))
hl-line
is the customizible face added in Emacs 22 according to the author of hl-line+
.
精彩评论