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&...
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 #+...
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
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 ...
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 ...
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 ...
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 ...
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{\(.+\)} ...
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 ...
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 ...
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 ...
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 ...
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
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", ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
0
votes
1answer
212 views

clear highlighted matches of an isearch

I've rebound some keys in god-mode so that S and R start a forward and backward incremental search and s and r repeat but never start incremental searches. This is the approximate division of labor ...
2
votes
2answers
174 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 ...
1
vote
3answers
258 views

Highlight regexp case insensitive

Is there a way to use highlight-regexp in a case-insensitive way? I'm parenthesizing an expression in my regexp and refer to it using \1 later and I want to match this regardless of case. I'm trying ...
2
votes
2answers
290 views

Emacs equivalent to :set list in vim

I'm looking for a way to display hidden characters like newline and tab characters in emacs. I am NOT trying to convert the characters, just display them in the current buffer. In vi(m), I can do ...
4
votes
2answers
204 views

Incremental search in all visible buffers

Here's a feature I always wanted: I have two buffers opened side-by-side and I'd like to be able to start an incremental search in one of those buffers, but in a way which highlights results in both ...
0
votes
0answers
123 views

highlight indentation with emacs client

I realized that neither highlight-indentation nor highlight-indent-guides works with emacs in server/client mode. I'm launching emacs server/client like this : $ /usr/bin/emacs --daemon $ ...
3
votes
1answer
356 views

temporarily highlighting current line

The minor mode global-hl-line highlights the current line "permanently" (until it is disabled). Instead, I would prefer a command which highlights the current line for, say, one second. Has anybody ...
1
vote
2answers
76 views

Best hook to keep my regexp highlighted

I need to have non-ASCII chars highlighted in my latex-mode buffers. So I added this lines in my .emacs: (add-hook 'LaTeX-mode-hook '(lambda () (highlight-regexp "[^[:ascii:]]" 'custom-...
0
votes
0answers
34 views

Problem when highlighting region using hlt-highlight-region

The thing I want to do is to highlight regions in a file covered by jest JavaScript tests. For testing I'm in an .emacs buffer, and I'm trying to highlight a single line in another buffer that I have ...
1
vote
0answers
288 views

Correct web-mode syntax-highlighting in org-mode src blocks

When adding source blocks in a org-mode document (usually with the shortcut <s TAB), it usually works fine, but specifically with web-mode, if I edit any snippet with the special editor (C-c-'), it ...