Questions tagged [hl-line-mode]
The hl-line-mode tag has no usage guidance.
26
questions
0
votes
1answer
22 views
In org-agenda, highlight marked entries
Running Doom Emacs v2.0.9 on Emacs 27.1.
I can mark several entries in the agenda buffer and work on all of them together.
Is there a way to keep marked entries highlighted? This would give more ...
1
vote
2answers
29 views
Highlight current line in org-agenda
Running Doom Emacs v2.0.9 on Emacs 27.1.
In the agenda buffer, how do I get the current line highlighted?
global-hl-line-mode is enabled and the current line in other buffers is highlighted as ...
4
votes
1answer
288 views
How do I highlight the current line?
I am obviously not well versed in the world of Emacs so I was watching Casey Muratori's Emacs video and whenever he traversed any file in Emacs, the current line always had a different background ...
2
votes
1answer
184 views
Why is hl-line+.el not a package?
Apparently hl-line+.el solves certain performance problems of hl-line-mode.
It is created in 2006, and last updated in 2018.
Despite that, it was never packaged to be available at e.g. melpa, which ...
0
votes
2answers
40 views
How to automatically enable a mode for only one specfic type of buffer?
I user dired to browse file, and I would like to use hl-line-mode which highlights the currents line, but I only want it to be enabled automatically when using dired
0
votes
2answers
446 views
hl-line-mode interferes with custom syntax highlighting [duplicate]
Recently, using fic-mode as reference, I implemented a way for words like TODO, etc. to be highlighted. Here is the code:
(defun todo/pos-in-doc-or-comment-region-p (pos)
(memq (get-char-property ...
5
votes
2answers
227 views
hl-line face used as default in 26.1
When I use emacs 24.3.1 and run
/usr/bin/emacs -Q
Then M-< followed by M-xglobal-hl-line-mode and M-xdescribe-face, emacs asks me
Describe face (default `font-lock-comment-delimiter-face'):
But ...
2
votes
2answers
198 views
Highlight current line in GUD disassembler window
I am using GUD for debugging C code. Because many of the lines and variables have been optimized away, it is necessary to follow the C source and the corresponding disassembly simultaneously. I want ...
0
votes
1answer
127 views
How to change setting for all modes except one?
How can I chance an Emacs config setting (let's say "highlighting of current line") that I set in .emacs as (global-hl-line-mode +1), to work for all modes except one.
For example, I want ...
3
votes
0answers
128 views
How to keep hl-line updated in inactive window?
I have (setq global-hl-line-sticky-flag t) to enable hl-line in all windows. However, the highlighted line isn't updated when I change the cursor position in inactive window (e.g., by calling next-...
0
votes
0answers
211 views
term without line numbers and highlight for current line
I have the following settings in ~/.emacs:
(setq linum-relative-current-symbol "")
(linum-mode)
(linum-relative-global-mode)
(global-hl-line-mode t)
In order to supress both these features in ...
3
votes
0answers
186 views
How can I make hl-line mode not override the color of rainbow-mode? [duplicate]
Is there an non-intrusive way to do this?
I've made a fork of rainbow-mode that uses overlay instead of text properties, which solves this :)
https://github.com/amosbird/rainbow-mode
4
votes
1answer
492 views
How can I eliminate the side effect of left margin?
I've set a left margin like this:
(set-window-margins (get-buffer-window) 20 0)
(let ((gutter-sep (concat (make-string (- (car (window-margins (get-buffer-window))) 2) ? ) "+")))
(propertize "." '...
1
vote
2answers
979 views
Disable hl-line-mode at startup
Something turned hl-line-mode on, which is painful to look at with my color theme.
I've added this to my .emacs
(hl-line-mode -1)
(global-hl-line-mode -1)
to no avail.
I've tried commenting out ...
0
votes
1answer
53 views
How to account for tabs in `hl-line-range-function`?
To avoid conflicts with highlighting indentation, I made the highlight line begin after the current indentation.
This works well, except when tabs are used as leading white space.
How could the my-...
2
votes
1answer
254 views
Automatically turn on hl-line-mode inside org-mode tables
Based on this answer my question is whether there is a (simple) way to automatically turn on hl-line-mode whenever the cursor is within an org-mode table in an org-mode file.
I tried to find a hook ...
0
votes
1answer
148 views
Setting hl-line-mode for programming modes
In my init file I have this:
(add-hook 'prog-mode-hook (lambda () (linum-mode 1)))
So it shows line numbers only for programming modes. I tried to do the same with hl-line-mode, but it does not work:...
8
votes
3answers
3k views
Highlight current line without changing colours
I use (global-hl-line-mode 1) in order to highlight the current line.
This changes the text colours of the highlighted line. Is it possible to highlight while keeping the current syntax highlighting ...
1
vote
0answers
369 views
Can I override global-hl-line-mode in a buffer/window?
I have the following line turning hl-line-mode on globally in my init file:
(global-hl-line-mode)
Most of the time, that's how I like it. But sometimes I want to turn it off. I'd hoped that I could ...
4
votes
2answers
4k views
Enable hl-line-mode globally
Running M-x hl-line-mode enables highlighting for the current buffer.
How can i set highlighting current line to be enabled in init.el?
0
votes
1answer
238 views
Eval-buffer works, init does not hl-line fix
I have written the following bit of emacs lisp that allows hl-line to extend past end of buffer to the rest of the line.
Problem is, this only works if I use (eval-buffer) after start-up and not when ...
5
votes
1answer
859 views
Combine highlight-symbol-mode and hl-line-mode
I want to highlight the current symbol under the cursor as well as the current line, but with different background colors.
Combining highlight-symbol-mode and hl-line-mode only highlights the entire ...
3
votes
1answer
3k views
Changing the background of line number column (linum) to the same color of line highlighting background color
Is there a way to set the background color of the line numbering to the same color of the line highlighting background color?
So far I have to put the line numbering background color manually and of ...
12
votes
1answer
1k views
How to highlight current line only in selected window?
Q: is there a way to have hl-line-mode highlight the current line
only in the selected window?
When I have multiple windows showing buffers with hl-line-mode
on, it is difficult to tell, at a ...
10
votes
3answers
2k views
hl-line-mode hide background, how to avoid this?
With:
(when window-system
(set-face-background 'hl-line "light yellow")
(global-hl-line-mode 1))
current line highlighted by yellow background, but if text has background properties it also ...
8
votes
2answers
1k views
Disable hl-line-mode only for eshell and ansi-term
I have global-hl-line-mode setup in my init file:
(use-package hl-line
:init (global-hl-line-mode 1))
Is it possible to disable it when I am in eshell and ansi-term?
I tried adding a hook like ...