Questions tagged [highlighting]

is for changes to fonts and colors for highlighting text. Emacs uses highlighting extensively to set apart portions of visible text in a buffer. Highlighting can also apply to dynamic text during search and replace operations, syntax highlighting in programming modes, and for alerts for errors during debugging.

Filter by
Sorted by
Tagged with
4
votes
2answers
122 views

AUCTeX: only use monospace for rendering macros?

I've been using the fontify features of AUCTeX, as well as magic-latex-buffer, to display my TeX code in a more readable way. But I'm wondering if I can crank this up to 11: is there a way to render ...
3
votes
1answer
149 views

Highlight rectangle and non-rectangle selection at the same time

By default, Emacs highlights the non-rectangular selection; alternatively, you can use (rectangle-mark-mode) to show the rectangular selection. Instead, I'd like to always show both, by highlighting ...
0
votes
1answer
17 views

highlight occurences for thing under point also for substrings

With point over a word, pressing C-u C-s highlights this word and any identical words. How can I make this work for substring search as well, i.e. if highlighting the word house, occurrences of houses ...
0
votes
1answer
30 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 ...
2
votes
0answers
93 views

How to highlight matching brackets when the cursor is behind or in front of starting or ending brackets?

I am using Emacs: Highlight Brackets ()[]{}. I want to highlight matching brackets when the cursor is behind and front of starting and ending brackets. How can I accomplish this? foo ( "hello&...
0
votes
1answer
129 views

Blinking Paren Mode

I'm trying to get Paren Mode to be a little more clear, cause I can hardly see the other matching pair of parenthesis. Is there any way I could make this blinking yellow?;) I'm in gnome-terminal. Here ...
0
votes
1answer
18 views

Certain keywords show font weight of bold

The syntax highlighting in Emacs is not great so I installed tree-sitter plugin to improve it and configured it like this, ;; Tree sitter (use-package! tree-sitter :config (require 'tree-sitter-...
0
votes
1answer
29 views

How to stop Emacs from highlighting Linux Tab characters?

So I opened a c++ script made in Xubuntu and every tab character was highlighted with grey. That doesn't happen when I open scripts made on Windows. How do I stop Emacs from highlighting them, it's ...
0
votes
1answer
126 views

Make highlight-changes-mode untrack specific changes

I recently discovered highlight-changes-mode and I added it to my proofs-typesetting setup (LaTeX). I usually make some temporary changes to my buffer that I like not to be tracked (highlighted) when ...
1
vote
1answer
21 views

Color settings with helm

I use helm a lot. I have a problem setting colors. In my init.el I have (require 'helm) (require 'helm-config) ;; change active line color (set-face-attribute 'helm-selection nil :...
13
votes
2answers
737 views

Change highlight color when window isn't in focus?

I'm using hl-mode as a minor mode for deft. How do I make the highlighted line change color (e.g. to gray) when the deft window isn't the current window, and then back to the default highlight color ...
2
votes
2answers
1k 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

Whitespace-mode: highlight hidden indentation of empty lines

I use whitespace-mode, intend with tabs (colored pale yellow, which is what I want) and I am wondering about the situation where there is an empty line inside an indented block (see image below). I ...
14
votes
1answer
495 views

Is there a plugin that does color HTML matching tags like rainbow delimiters?

I would like some plugin which colors html tags with a corresponding color based on which tag they match. For example <div> <p></p></div> <div> and </div> would ...
0
votes
1answer
40 views

Highlight all words in a line

Is there an easy way to highlight all the words in a line with just one command? I'm trying to write an elisp function to achieve this but my knowledge is pretty rudimentary. So far, I can only move ...
0
votes
1answer
47 views

Custom search for text under cursor

I would like to write a custom elisp function that searches for a few variants of unicode text under a cursor and highlights their occurrences in the currently open file. For e.g. if my text is ...
1
vote
1answer
27 views

How to make Isearch highlight more matches when I scroll?

upon having used Isearch or C-u C-s to highlight a word, when I use then C-v or M-v for scrolling the highlights remain due to setting (setq-default isearch-allow-scroll t lazy-highlight-...
1
vote
1answer
109 views

Highlight parentesis in latex

the image is self explanatory, I recently switched to doom emacs and I'm still learning. How can I fix this problem? I tried to switch off anything related to checkers in the init.el file but it doesn'...
0
votes
0answers
44 views

How to change mu4e headers such that it only highlights the current line?

The mu4e *mu4e-headers* mode looks something like this by default, Notice how the text in the current line is underlined while the entire length of the line is highlighted? It is also showing the ...
1
vote
2answers
70 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 ...
1
vote
2answers
69 views

How to show invisible/problematic characters such as TAB and Narrow No-Break Space in an org-mode table?

Is there a way to indicate where you have an "invisible" character that's causing problems in an org-mode table? The character's likely a TAB, but for the general case I'd like to assume it ...
0
votes
1answer
26 views

Make mark color overlap highlight symbol at point

I use auto-highlight-symbol-mode package to auto highlight symbol on point. I found it annoying when I mark a text because the symbol highlight overlaps on my marked text, so I don't see if I marked ...
0
votes
0answers
50 views

in Fundamental mode, give certain marked text a different face

I am trying to add a new comment character in fundamental mode, but I can't get it to work. Let me rephrase that, because I think it's an xy-problem. What I really would like to have is the ...
0
votes
1answer
39 views

How to prevent highlighting when using ‘xref-pop-marker-stack’

I was using dumb-jump to get back from jump definition's location. I started to get following message: ‘dumb-jump-back’ is an obsolete command (as of 2020-06-26); ‘dumb-jump-back’ has been obsoleted ...
5
votes
1answer
247 views

Why does mousing over one button also highlight adjacent buttons?

I'm using some buttons, and want to arrange them in a row. That is, some will be directly next to each other. I don't want whitespace between them. This is easy enough to do: However, when I do this, ...
6
votes
1answer
83 views

minor mode to display long integers?

I have to deal with long integers frequently, typically 9+ digits, and all of the digits matter (so scientific notation doesn't help me. Is there a minor mode that helps make it easier to visually ...
5
votes
2answers
325 views

Mysterious highlight in emacs

Recently, I change my laptop from old Thinkpad to newer laptop with much larger touchpad. I've found that I frequently touch the sensitive touchpad while I'm using emacs. And with some mysterious ...
0
votes
0answers
42 views

Is it possible to create a way to toggle showing/hiding/changing text following a pattern? (org-mode or generally)

I'd like to create a way to toggle showing/hiding/changing text following a pattern in org-mode, but if it works generally, that's fine also. A few examples of where this might be useful. Hiding #+...
0
votes
1answer
750 views

Color calendar day according to number of event in org-agenda

I would like to color the background of each day in calendar according to the number of events in my org-agenda. The idea is to have a quick and visual idea of what are the busiest days. The code from ...
1
vote
2answers
852 views

Spacemacs: How can I customize the highlight style of a matching parenthesis?

How do I change, in my .spacemacs, the style used to highlight the matching parenthesis?
1
vote
1answer
53 views

Connect open and close delimiters with a line

I wonder if emacs has something similar to this VSCode extension (Bracket Pair Colorizer 2) which does the following (screenshot below) which I find is a really helpful UI enhancement [ In the above ...
4
votes
1answer
423 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
146 views

Highlight a single visual line within a physical 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 ...
0
votes
0answers
39 views

Highlight matching parenthesis, only in Lisp mode (and maybe a few similar modes)

is there a way to have the global minor mode show-paren-mode functionality as a buffer-local minor mode? I love its behavior but only for Lisp. Searching for a package I can see a number of close ...
2
votes
0answers
44 views

Find and display duplicated regions of (org-mode) text across multiple files

What I'm trying to do I'm trying to condense a set of research notes consisting of over 250,000 words across 50+ files. I've converted these from previous file formats (mostly mind maps and OPML ...
1
vote
2answers
112 views

Highlighting Arbitrary text

I am trying to customize Emacs by adding a feature where I can select a block of text (like the region but not bound by mark and point). Currently I have implemented this by setting two variables ...
0
votes
1answer
53 views

How can I unhighlight everything highlighted by `highlight-regexp`?

If I do this: M-x highlight-regexp \cite{\(.+\)} then pick a color. Later, if want to unhiglight all previous higlights, I have to do them one by one, e.g. M-x unhighlight-regexp \cite{\(.+\)} ...
8
votes
2answers
710 views

Org mode quote block indentation (highlighting)

Can indentation of the Org mode quote block be configured? I would like to highlight quote blocks with indented margins, both left and right if possible: The example above demonstrates org-quote ...
0
votes
1answer
58 views

Expiring search highlights in Evil

I'm using the evil-search module ((evil-select-search-module 'evil-search-module 'evil-search)). When I perform a search, the results remain highlighted until I call evil-ex-nohighlight. I'd prefer ...
0
votes
2answers
332 views

Highlight a specific phrase in any emacs buffer, regardless of mode

I would like to be able to highlight a particular phrase (in my case: @dakrone) in every emacs buffer, regardless of the mode (it's fine if it doesn't work in fundamental-mode). I know of something ...
1
vote
3answers
180 views

How to check if a region is selected by mouse?

Usually a mouse selected region is highlighted and a region set by (set-mark-command) is not highlighted. But I don't know a programmatic way to check it. Could anyone help?
2
votes
1answer
392 views

Disable lsp-mode symbol highlighting?

When using lsp server, symbol highlighting obscures the highlighting done by region selection. I can toggle this behavior per-buffer with lsp-toggle-symbol-highlight, but cannot permanently disable ...
1
vote
1answer
257 views

How to give background color to hl-todo-keywords?

I am using following setup in my .emacs file: (setq hl-todo-keyword-faces '(("TODO" . "#FF0000") ("FIXME" . "#FF0000") ("DEBUG" . "#A020F0") ("GOTCHA" . "#FF4500") ...
2
votes
1answer
114 views

column-marker skips blank lines; how to fix?

I installed column-marker.el. I like the highlighting style better than fci-mode. Unfortunately, column-marker does not highlight bits of the window where the actual line is not 80 chars or more (or ...
0
votes
1answer
109 views

Automatically highlight elements in an XML buffer

I spend a lot of time in XML buffers using nxml-mode (Emacs 26). Out of hundreds of XML elements, I am only interested in one or two. How can I have Emacs always show the XML elements I'm interested ...
1
vote
0answers
91 views

keymap (overlay / text property): how to create and modify?

I'd like to have certain keymap active when the cursor is in a particular highlighted area. For instance, I would like to bind hl-todo-next to some easy key combination, but only when the cursor is on ...
3
votes
1answer
201 views

Make pdf-tools highlight persist after searching

Is it possible to make the highlight of searched terms persist after pressing RET? I had liked very much the behavior of zathura in this aspect. My question is : Can pdf-tools be tweaked to have the ...
1
vote
1answer
140 views

How to make highlights persistent?

I don't want themes. I use bold,italics, and highlights. I also use background colors per file, so the code as in for background need to be embedded inside file. But when I Edit->Text Properties-&...
2
votes
0answers
34 views

Different face for checked-off items in plain lists?

Q: how can I get a different face for checked-off items in org plain lists? I use org-mode's plain lists a lot: - [X] item 1 - [ ] item 2 - [ ] item 3 - [ ] item 4, with a whole lot of text that ...
8
votes
3answers
4k 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 ...