Questions tagged [hl-line-mode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
49 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
31 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
120 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
154 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
107 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
81 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
99 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
148 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 ...
2
votes
0answers
142 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
3
votes
1answer
297 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
391 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
44 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
178 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
112 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:...
6
votes
2answers
2k 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
239 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
3k 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
200 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
654 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
2k 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 ...
2
votes
1answer
74 views

Highlight a single line in a long word-wrapped line

I want to have a single line in a long-word wrapped line highlighted. The default setting of hl-line seems to highlight the whole wrapped line as shown below. Which setting do I have to change to ...
9
votes
3answers
1k 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 ...
7
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 ...