Reputation: 6856
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?
Upvotes: 33
Views: 13633
Reputation: 5683
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+
.
Upvotes: 2
Reputation: 73274
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.
Upvotes: 13
Reputation: 192487
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.)
Upvotes: 60