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
0
votes
0answers
13 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
13 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
32 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
158 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
92 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
160 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
34 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
108 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
53 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
279 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
169 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
55 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
69 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
119 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
107 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
173 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
159 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
144 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
69 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
260 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
25 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
191 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
596 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
353 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
133 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
194 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
65 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
170 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
94 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
105 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
228 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
346 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
196 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
183 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
236 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
164 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
70 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
494 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
291 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
182 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
2k 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
391 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
123 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
55 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
44 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
240 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-...