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
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 ...
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 ...
13
votes
1answer
249 views

Highlighting missing references

Is it possible for auctex to display missing references differently to ones which are in the bib file? Currently, all references look identical so it's impossible to tell at a glance which citation ...
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 ...
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 ...
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 ...
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.
7
votes
1answer
1k views

How to highlight specific keywords inside strings/quotes?

I have another syntax highlighting for SQL keywords inside strings (inside quotes) in VIM. It looks like this: Then in Emacs with PHP-mode, everything between quotes (') will be considered as a ...
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 ...
7
votes
2answers
133 views

How to highlight preceeding space-indentation that isn't rounded to current width?

Is there a way to highlight (set the background color for example) the space before a line, when it's indentation isn't aligned to the current indentation-width? 4 spaces indentation for eg: fn ...
7
votes
0answers
425 views

How to indicate the currently clocked-in task?

I'm using org-mode's clocking functions to track the hours I spend on projects. Since my main org file is rather large and I scroll through it a lot, it would be great to have a visual cue of the task ...
6
votes
3answers
363 views

Turn off mouse highlighting in org-agenda

When I am viewing my org-agenda, whatever line I have the mouse point on is highlighted. Since I never act on these lines with the mouse, and since the line where point is is also highlighted, the ...
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 ...
6
votes
1answer
103 views

Whitespace highlighting

I've tried whitespace-mode, but I can't configure it the way I want. There are others, but some of them are obsolete and I don't want to try them all. I always indent via tabs and can't stand ...
6
votes
1answer
560 views

Line highlighting canceling out syntax highlighting

I use hl-line-mode and I really like the built-in misterioso theme. However, the way that lines are highlighted with this theme cancels out syntax highlighting or any other properties of the ...
6
votes
1answer
85 views

How to highlight text based on regions--not regular expresions

When font-lock-mode is enabled I cannot get custom faces to stick with add-text-properties or set-text-properties. I've looked through libraries like hi-lock.el, but they all seem to be regexp based. ...
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 ...
5
votes
1answer
798 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 ...
5
votes
1answer
301 views

How can I get VolatileHighlights to work with evil-yank, evil-delete, etc?

With the guide on extending Emacs, I discovered the volatile highlights package. But it only works on Emacs operations like kill and yank. I would like to use it with Evil operations like evil-yank ...
5
votes
0answers
595 views

ps-print-buffer-with-faces with color-theme'ed dark background

Similar to Change syntax highlighting when doing ps-print-buffer-with-faces I typically use emacs with a dark background, but I'd like to print my buffer onto a white background (i.e. white paper). ...
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?
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 ...
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 ...
4
votes
1answer
517 views

Change syntax highlighting when doing ps-print-buffer-with-faces

Hopefully a simple question. I code in c++ in emacs with a dark background and the syntax highlighting is perfect for viewing that way, however when I print on white paper, some of the colours like ...
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 ...
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 ...
3
votes
1answer
278 views

Stop highlighting parentheses when I start typing

I use (show-paren-mode 1) to get help seeing where parentheses are. I have (setq show-paren-delay 2) to prevent intrusive highlighting when I don't need it. This is how it works now: Put cursor on a ...
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 ...
3
votes
3answers
1k views

Org-mode highlighting or font coloring

I'm using org-mode for writing and want to be able to highlight sentences or paragraphs which need to be re-written or fact-checked so that those bits are obvious looking through the document. Is ...
3
votes
1answer
805 views

How can I specify the background color for matching search results?

When I incrementally search for a phrase with C-S, emacs usually highlights all matching results visible in the buffer by giving them a different background color. However, my current theme apparently ...
3
votes
0answers
88 views

How to place asterisks in beginning and end of lines in a marked region?

I use org-mode a a lot and take notes in Org files. I like to sometimes highlight some important text. I colored bold to be red but it doesn't span multiple lines. And I couldn't get that to work ...
3
votes
0answers
94 views

Highlight *other* occurrences of symbol

I've found that using the highlight-symbol-mode provided by highlight-symbol works very nicely for highlighting all occurrences of the symbol at point, automatically (without my pressing anything). ...
3
votes
0answers
86 views

Highlighting the changed line in the source file in the resulting pdf using auctex and pdf-tools?

Is it possible to highlight the changed line in the resulting pdf using auctex and pdf-tools. I have this feature enabled in Skim with the following lines in my setup. (add-hook 'LaTeX-mode-hook (...
3
votes
0answers
1k views

Highlight current line and column

Is there a solution to highlight current line and column where the cursor is now? I tried this plugin, but then emacs motion are lagging like hell. I was able to highlight the line (global-hl-line-...
2
votes
2answers
291 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 ...
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
2answers
214 views

Highlighting automatically on file open

I would like to highlight lines with a certain pattern whenever the file is opened. Specifically when Journal.org is opened I want to run commands like M-s h l to highlight a set of patterns and ...
2
votes
1answer
84 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, ...
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.
2
votes
1answer
301 views

A compilation-mode conundrum - matching and highlighting

Whilst playing around with compilation-mode for running tests and using HIGHLIGHT faces for failed expectations I've encountered a bit of a conundrum. Question: why does my compilation-errors-regexp-...
2
votes
3answers
587 views

Is there a way to underline symbol under cursor?

I want to highlight somehow symbol under cursor, is there a way to customize font for that current symbol? Ideally I want to add underline with some color to it, or maybe change bg color of text, is ...
2
votes
1answer
528 views

change how initial parenthesis is highlighted

I recently installed a programming package, "Haskell mode," and apparently I changed how "initial parenthesis highlighting" works. I'm used to a quick black/white box superimposed on the initial ...
2
votes
1answer
210 views

Highlighting selected region in same buffer, displayed in multiple windows

Q:  I am seeking a proposed modification of simple.el at lines 5251 to 5308 of the master branch relating to highlighting a selected region to achieve a better visual representation when the same ...
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 ...
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
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 ...
2
votes
1answer
204 views

Jump to and highlight characters matching regex

How can I jump to the next character matching a regex (see example below)? And if possible, enable highlighting of all the matching characters in the buffer when I jump for the first time. [^\x20-\...
2
votes
1answer
199 views

highlight different regexp groups with different colors

Is there a way, that each group in regexp can be highlighted with a different color. For example, if I am searching for \(text_part_1\)\|\(text_part_2\) Can the text_part_1 be highlighted in one ...
2
votes
1answer
592 views

Highlight Multiple Lines in Emacs

I wonder if there is any package which lets me do this: Hightlight entire line where point is currently located If you move point away, it keeps the that line highlighted Multiple lines can be ...
2
votes
1answer
475 views

Can't change the line-highlight color

I try to set a new hex-color to highlight the current line in the distinguished theme, but this can have no effects. I put this in init.el: ;;highlight current LINE (global-hl-line-mode 1) (set-face-...