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
0answers
10 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
30 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
111 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
76 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
155 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
36 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
33 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
105 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
45 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 ...
0
votes
1answer
222 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?
2
votes
2answers
135 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
53 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
64 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
101 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
99 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
157 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 ...
1
vote
2answers
140 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
135 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
65 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
247 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
63 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
23 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
178 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 ...
2
votes
3answers
524 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 ...
1
vote
1answer
320 views

How can I change the parentheses highlight style?

When the cursor in next to a parenthesis, bracket, or brace, it highlights it and the matching one (if any). This is expected. But by "highlights", I mean it entirely hides the things under a small ...
2
votes
1answer
124 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-\...
3
votes
1answer
178 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 ...
0
votes
0answers
62 views

Auto highlighting text when paste a new content

This is my first post here. I have Emacs installed at work and at home. The functionality is slightly different when I use highlighting and I cannot figure out which options to change. At work, I ...
0
votes
2answers
155 views

Highlight useless whitespace at end of file

How do I make Emacs highlight whitespace at EOF, eg. any whitespace after >?\n for PHP? I think the general rule would be: After the last non-whitespace character, accept one newline, then ...
0
votes
1answer
85 views

Highlight (and increase font) for specific words in the buffer when it's opened

I'm looking for functionality that will allow me to highlight specific words of text when I open the buffer in specific mode, like it should work if you're in js2-mode web-mode vue-mode and the ...
0
votes
1answer
85 views

Highlight a buffer with custom programming language syntax

I have files which are not .py but they are python code. I want to highlight them as if they were python files. How can I do that.
0
votes
1answer
217 views

magit-status does not highlight diffs

I'm currently seeing a display problem in Magit. For a while I've seen that when I do magit-status, the diffs are no longer highlighted. I didn't care for a while, thinking it was the theme I've been ...
7
votes
2answers
322 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 ...
1
vote
1answer
190 views

color rgrep matching results in the rgrep results buffer

I am liking rgrep as it lets you choose a path and searches recursively. How is it possible to highlight the matches in the rgrep buffer?
0
votes
2answers
166 views

How to save the text selection and keep the selection highlight

In Emacs 25 how can I save the text selection and keep the selection highlighting when using Transient Mark mode? If I use kill-ring-save, the highlighting is switched off and I have to switch it on ...
0
votes
1answer
223 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 ...
2
votes
1answer
158 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
50 views

Improve my highlighting function

I wanted something that highlighted a snippet of code that I wanted to keep in mind - NOT marking it, I just want it to pop out visually. As a bonus, I'd like it to get pushed to the mark ring so I ...
3
votes
0answers
68 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 ...
2
votes
1answer
467 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 ...
1
vote
1answer
283 views

Is there a way to highlight the (s) expression you are in?

I currently have (paren-set-mode 'paren) in my init.el, and it does a good job of highlighting the area between parentheses. However, I was wondering if there was a way to highlight the expression I ...
1
vote
1answer
177 views

Same or more powerfull as highlight-symbol? [closed]

Windows 10, Emacs 25. I use package highlight-symbol for highlighting text. It's very useful. But after 3 years of using it was not enough for me. Is Emacs has another package with same or more ...
1
vote
1answer
1k views

Turn off whitespace-mode highlighting

I took the following from this site. (progn ;; Make whitespace-mode with very basic background coloring for whitespaces. ;; http://ergoemacs.org/emacs/whitespace-mode.html (setq whitespace-style ...
1
vote
2answers
357 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 ...
2
votes
1answer
53 views

How to highlight “prettified” symbols?

I would light to highlight where prettify-symbols-mode has prettified a symbol. For example, if Emacs displays lambda as λ it could be displayed with a gray background, but if a literal λ occurs in ...
1
vote
1answer
121 views

How to highlight a buffer between given pairs of points?

I have a list that looks like this: (((assoc) (start (assoc) (line . 430) (col . 28)) (end (assoc) (line . 430) (col . 37))) ((assoc) (start (assoc) (line . 433) (col . 14)) (end (assoc) (...
1
vote
1answer
49 views

Highlight matched string in loops

I'm writing a loop to perform some interactive replacements on matched strings: (while (search-forward-regexp "REGEXP" nil t) (read-char "Options:...") ; Replacements... ) and I need the ...
0
votes
1answer
43 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
232 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-...
7
votes
2answers
115 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 ...