help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hl-line mode -- visual effect


From: Dani Moncayo
Subject: hl-line mode -- visual effect
Date: Wed, 10 Aug 2022 19:51:29 +0200

Hello guys,

I have this in my init file, to enable "hl-line" mode in all my buffers:
  (global-hl-line-mode 1)

Until now, I have customized the "hl-line" font to set a background
color, slightly more saturated than the background of the "default"
font.

This approach has worked reasonably well for me for quite some time.
But it's not perfect: I have buffers (eg. "*Diff*" buffer)
where the background color of each line conveys valuable semantic
information (added line, removed line, ...), and thus, in those
buffers,
my current approach doesn't work well, because the background color of
the selected line is fixed (i.e. _overrides_ the _original_ background
color of the line).

So, I'd like to highlight the selected line in a more subtle way: I'd
like the selected line to slightly alter[1] the _original_ background
color.

Does Emacs currently provide a reasonably simple way to achieve this?

TIA

-- 
Dani Moncayo

[1] "alter" could be something like "increase a bit the saturation or lightness"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]