Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
3answers
41 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
33 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
26 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
46 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
40 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 ...
0
votes
0answers
46 views

Cursor/Line highlighting in a inactive/non-selected window

While viewing an item within a multi-item result (eg., that of grep) in another non-selected window, the current cursor position in the inactive window is shown by a non-blinking hollow box; see the ...
1
vote
2answers
62 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
74 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
38 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
93 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
51 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
16 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 ...
0
votes
0answers
78 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 ...
1
vote
3answers
217 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
157 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
83 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
120 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
54 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
87 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
59 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
0answers
212 views

Text highlighted in yellow cannot be deleted

Sometimes i get a portion of the text highlighted in yellow. This text can't be erased with a kill command nor delete. It shows up in emacs but not if I open the same file using another editor such ...
0
votes
1answer
39 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
144 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
220 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
134 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
117 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
173 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
113 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
47 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
52 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
324 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
205 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
132 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 ...
0
votes
1answer
895 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
200 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
47 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
91 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
37 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
37 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
187 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
105 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
2answers
2k 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.
2
votes
1answer
155 views

transient-mark-mode highlighting doesn't work until buffer display is refreshed

I recently upgraded to Emacs 25.1.2, and transient-mark-mode no longer works properly - sometimes. The behavior I see is that pressing C-spc and moving the cursor to select an area of text doesn't ...
1
vote
1answer
59 views

Highlight with Evil's `:g` command

Evil has a beautiful :s(ubstitute) implementation, which shows the regexp inline as you type: However, the feature doesn't exist for the global command, :g (such that :%g/emacs/... will find the line ...
0
votes
1answer
70 views

Highlight text based on condition on consecutive lines

How can we visually add separators in log files, based on conditions between consecutive lines? Sample log file: [DEBUG][2016-05-26 10:24:51,714][FileHelper] - [realContextPath] [DEBUG][2016-05-26 ...
0
votes
1answer
95 views

Setting hl-line-mode for programming modes

In my init file I have this: (add-hook 'prog-mode-hook (lambda () (linum-mode 1))) So it shows line numbers only for programming modes. I tried to do the same with hl-line-mode, but it does not work:...
1
vote
1answer
1k views

How to automatically highlight all the words same with selection just like Notepad++

For example when I select a word I want the same words to be automatically highlighted just like it in Notepad++: When I select the word "install" in Notepad++ (all other "install" are highlighted"): ...
1
vote
3answers
382 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 ...
3
votes
0answers
165 views

Highlight indent guides in org-mode src blocks

is it possible to show indentation guides in org-mode source code blocks? I use highlight-indent-guides-mode for highlighting indention and it does not work in org-mode (I think this is because the ...
0
votes
2answers
48 views

Keep selection on/reselect for multiple query-replace sessions

Following this thread: https://stackoverflow.com/questions/39808820/replacing-on-mouse-selected-area-in-emacsI can highlight an area, and do replace only on this area. Great! Now, I want to do several ...