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
1
vote
1answer
5 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, ...
0
votes
0answers
58 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'...
6
votes
1answer
62 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 ...
0
votes
0answers
23 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&...
5
votes
2answers
258 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
37 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
580 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
575 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?
0
votes
1answer
94 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
2answers
705 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 ...
1
vote
1answer
32 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
183 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
105 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
21 views

Change color of highlghted annotated text in pdf-view

I use pdf-tools to read pdf in emacs. You can highlight a text in the pdf and do C-c C-a h to highlight the text. In normal light mode, the text will be yellow and you can customize it via M-x ...
13
votes
1answer
422 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
0answers
32 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
29 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
48 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
37 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
509 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
0answers
38 views

Permanently highlighting lines in differnt colours

I'm using the bm package to highlight lines of Code (bm-toggle). Now as I'm heavy debugging I'd like to use this feature more extensively and would like to add more different colours. Also when I'm ...
0
votes
1answer
21 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
296 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 ...
13
votes
1answer
647 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 ...
1
vote
3answers
101 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
133 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 ...
0
votes
1answer
97 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
86 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 ...
2
votes
1answer
107 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
47 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
50 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 ...
2
votes
1answer
85 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
77 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-&...
0
votes
0answers
47 views

How to highlight variable in scope?

assuming my cursor is going over a specific word in the text, I would like to highlight all occurrences of that variable in the scope. function sayHello () { const hello = 'hello world'// cursor is ...
2
votes
0answers
31 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 ...
7
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
29 views

Massively long text boxes and yasnippet highlighting

Why are my text boxes and yasnippet field highlights so massively long? Is there a way to change this behavior? If so, what are the necessary steps that need to be taken to solve this issue? The ...
16
votes
4answers
7k views

How to unhighlight symbol highlighted with highlight-symbol-at-point

highlight-symbol-at-point is really useful however I could not find an easy way to un-highlight symbols. Currently I have to call unhighlight-regexp repeatedly for each highlighted symbol. Is there ...
1
vote
0answers
18 views

Highlighting the currently active org-Babel block

I want to do something similar to hl-line-mode but not sure if it has been implemented already and how it can be implemented. The goal would be to set two color schemes for the #+begin and #+end ...
0
votes
0answers
39 views

How to display a (basic) column indicator? [duplicate]

Since fill-column-indicator is no longer actively maintained, how can I visualize the fill-column? The fill-column-indicator package was quite heavy and had compatibility issues with other packages. ...
0
votes
1answer
333 views

Set different highlight-line color for emacs --no-window

How can I set a different color if I am using emacs on terminal (emacs --no-window)? I use a grey highlight line when using emacs with GUI because my background theme is white. Here is the code I use ...
2
votes
1answer
164 views

How to highlight 80 columns when it contains a single % at the start

How can I highlight 80 columns when a line has a single % at the very start? What I am looking for is that lines with a single % stand out by a colored rectangle 1 character high and 80 columns wide.
3
votes
1answer
183 views

regexp: exclude repeated characters for highlight - hi-lock-mode

I want to search using regexp to capture plain text. I want to capture passages that begin with opening quotation marks and end at the end of the paragraph, and even though the quote continues onto a ...
0
votes
1answer
44 views

Highlight some specific text in Emacs

I am using web-mode for my php files: http://web-mode.org/ And I call often a php function which looks like this: __lg('Some text here', 'Global', NULL, FALSE); This function can be call with only ...
2
votes
1answer
129 views

Highlight missing double-space between sentences?

For a while, I've been using sentence-end-double-space: nil. Now I want to get back into the habit of using two spaces to separate sentences. It is the convention for GNU documentation, and it ...
2
votes
1answer
43 views

Multiple transient (and colorful) mark-modes

When reading a book it's nice to have a marker to highlight some phrases. When re-reading my own code, I often would like to highlight several regions ("here is the set-up", "here is the conclusion", ...
0
votes
2answers
86 views

How to make new text highlighted as well?

Run in *scratch*: (progn (fundamental-mode) (hi-lock-mode 1) (highlight-regexp "." 'hi-pink)) Result: If I add text it is not highlighted depending on where I add it: How can I make all newly ...
3
votes
2answers
371 views

Bookmarking / Highlighting lines in a file

Is there an Emacs feature for highlighting some lines in a file to make it easier to jump around? My immediate use-case is a gigantic auto-generated C++ file with horrible indentation, which is rather ...
7
votes
2answers
4k views

Highlight region

How do I highlight a region and it make it remain highlighted when point moves on. Why would I want that? So I can make important snippets of code stand out when I review it later.
0
votes
3answers
72 views

highlight-regexp: what's the variable in which they are stored?

I need to write a macro, with-temp-highlight-regexps, that evaluates BODY and than restores the previous highlighted regexps (created with the highlight-regexp function). I thought I could do it by ...