Questions tagged [highlight]

Adding highlighting to the document other than syntax highlighting (such as hlsearch or :match)

Filter by
Sorted by
Tagged with
2
votes
1answer
44 views

How to highlight cursor line number without cursor line?

I want the cursor line number to have a different color than the rest of numbers with cursorline disabled. Sadly CursorLineNR is only active if set cursorline. I could do set cursorline followed by hi ...
2
votes
1answer
45 views

Print bound autocmds to a file

I would like to print all of my current autocmds to a file so that I can grep through and do further analysis. From within vim, the list of autocmds can be found with :autocmd, but this prints to a ...
0
votes
1answer
17 views

How to check what of highlight is the word on cursor?

I found this article, How to know which highlighting group is used for the background of a word? however, it prints out something not what I look for. It prints out like VimCommand VimOption ... but ...
1
vote
0answers
29 views

How do you highlight text surrounded by double equals

I'm using vimwiki plugin with markdown. I'd like to highlight text using double equals, which isn't standard, but is quite useful. Ideally, this should replace background (for instance, yellow) and ...
0
votes
0answers
8 views

How to get highlight style used for the text under cursor? [duplicate]

There is some text under my cursor that specific highlight is used. I do not know which highlight is that. I can type :highlight and randomly guess which could that be. Is there a method to just place ...
0
votes
1answer
21 views

Persistent highlighting (not affected by cursor movement) of selected lines?

I would like to highlight or color certain lines to mark them visually, and then move around freely in the file without affecting the selection. Is there a way of doing this? I know I can do 'v' to ...
0
votes
0answers
50 views

Highlighting the matching pair of a character changes the foreground color of Cursor

I'm using Vim 8.2 on Fedora 32. I have the following lines in ~/.vimrc for highlighting the Cursor, lCursor, CursorLine, and MatchParen highlight groups: highlight Cursor guibg=Green guifg=Black ...
0
votes
0answers
16 views

Set Background for Lines after EOF

I am trying to get transparency on DWM to work by setting the background color in vim to NONE. highlight Normal guibg=NONE ctermbg=NONE This works fine unless I have files that contain not enough ...
1
vote
1answer
38 views

Turning the `match` command on and off

I found this useful setting form this post, which highlights trailing whitespaces : highlight ExtraWhitespace ctermbg=grey guibg=grey noremap <F10> :match ExtraWhitespace /\s\+$/<CR> This ...
1
vote
1answer
22 views

How to highlight text between two delimiters / tags?

How do I highlight the block of text between two delimiters / tags / "surroundings"? (e.g., between matching parentheses ()s, quotes "", html tags (div../div), etc.) (Or maybe how ...
4
votes
1answer
144 views

How to fix unreadable highlighted text during search?

This is an example of how highlighted text looks in my vim: In the color scheme I am using (/usr/share/vim/vim82/colors/peachpuff.vim) the color is defined like this: hi Search term=reverse ctermbg=3 ...
1
vote
1answer
54 views

How to perform an action on search matches?

How can I visually select all text highlighted by a search in order to run a command on it? And if it's possible, how can I capitalize the selection?
0
votes
1answer
30 views

incsearch not working as expected

So I have the following example text: ##1## many text and lines ##z## ##1## many text and lines ##z## ##2## more text ##z## And after doing :set incsearch, and running :g/^##1##\n.*/+,/##z##/- (which ...
2
votes
0answers
42 views

Is there some way to retrieve/redisplay :echon output?

I want to create a multi-color enabled debug-print command. As far I know, the only way to print multi-color messages in Vim is: echohl Macro | echon "Hi" | echohl Statement | \ echon &...
1
vote
1answer
30 views

Persistent tag highlights when changing between buffers

I've put following code in my vimrc. function ExtraHighlights() let list = taglist('.*') for item in list if item.kind == 's' || item.kind == 't' || item.kind == 'u' || item.kind == 'g'...
2
votes
0answers
62 views

Vimdiff : highlight line numbers differently

I use relative line numbers thanx to the following settings in my vimrc: set number set relativenumber Since I don't want to wrap lines in diff mode, it's sometimes hard to tell which line include a ...
1
vote
1answer
89 views

No highlighting for replacement text using conceal

I just discovered Vim's conceal feature. I've added the following to ~/.vim/after/syntax/haskell.vim: syntax match haskOperator "->" conceal cchar=→ syntax match haskOperator "<-" conceal ...
0
votes
1answer
23 views

How do I turn of the 'haze' when highlighting black?

I have put this in my .vimrc highlight IgnoreGroup ctermbg=Black ctermfg=White let m = matchadd("IgnoreGroup", '\\todo{.\{-}}') This gives me the following result: Note that the \todo{stuff} ...
0
votes
1answer
20 views

Highlight group in `.vim/after/ftplugin` not highlighting patterns

While highlight group in .vimrc highlights patterns just fine, highlight groups in .vim/after/ftplugin folder does not seem to do anything. Is it normal?
3
votes
1answer
32 views

Can't see tag “<>” braces due to highlight color same as braces in Windows terminal

I'm new to Vim and am having an issue with highlight color of matching braces in Vim. if I type: <html> and my cursor is at the one of the <> greater/less-than brace then I can't see the ...
0
votes
0answers
14 views

Change match highlights on CmdlineLeave

Vim uses two different highlight groups for matching patterns while searching in the command-line with / or :substitute for example. The incsearch group for the match under the cursor The search ...
1
vote
2answers
34 views

Defining a color to be the same color of comments

I'm using the indentLine plugin to display line indents with a continuos vertical line, and I'd like to set the color of that line to the same color of my comments. To get the foreground color of my ...
2
votes
1answer
56 views

Unwanted highlights on page scroll

I have a pretty similar problem as in this issue with some exceptions. Basically, after I scroll page down or up Ctrl+d / Ctrl+u all non-empty lines get highlight from the end of the line to the ...
0
votes
1answer
38 views

How to highlight multiple words that are unrelated

I need to highlight multiple words that are unrelated, eg: aaa bbb ccc ddd I would like to highlight aaa and ddd, and keep cursor at both of those words, so when I try to change the word for example ...
2
votes
2answers
304 views

Is it possible to make “???” a keyword that can be highlighted?

Is it possible to make ??? (3 question marks) a keyword, and highlight it? I have tried the following in a syntax file. Other strings on the line are highlighted, but not ???. \?\?\? does not work ...
1
vote
1answer
8 views

How to enable search highlight when I use `normal! n` in a function?

I've set hlsearch. When I type :normal! n, the target text is highlighted. But when I put normal! n in a function(Search) and call that function(:call Search()), the highlight doesn't take effect? ...
2
votes
1answer
75 views

Highlight group for signature help

I'm using Vim (v. 8.2) with YouCompleteMe as a code completion engine. I welcome the addition of signature help, but I'm not happy with the default colors: Does anyone know what highlight group is ...
0
votes
2answers
135 views

Highlight results of :grep while in quickfix window

To my .vimrc I added a hook which automates entering the quickfix after :grep processing: autocmd QuickFixCmdPost [^l]* nested cwindow 20 Another thing I care about but can't achieve is automation ...
1
vote
1answer
37 views

How to set colors for vim warnings about existing swap files

Is it possible to set color for the warning message "Swap file XXX already exists! ..."? I couldn't figure out which highlight group it belongs to.
1
vote
1answer
63 views

Can I apply individual colours from one highlight in another one?

I have an auto command that changes some color scheme values so I can avoid forking them when all I need is small changes: augroup FixColorSchemes autocmd! autocmd ColorScheme * \ ...
1
vote
0answers
79 views

How to disable highlighting for custom group

I'm using a tip from this page of the vim wiki to highlight trailing spaces when I'm not in insert mode : highlight ExtraWhitespace ctermbg=red match ExtraWhitespace /\s\+$/ autocmd BufWinEnter * ...
2
votes
1answer
67 views

Highlight search phrase within quickfix window listing

One can change the search color of search terms with the Search highlight scheme. Similarly one can change the color of a line in the quickfix window with QuickFixLine. However, how does one change ...
1
vote
1answer
101 views

How can I highlight the current cursor position (not just the line)?

When I search a text file for a word from within vim, it will highlight all matches for the word by changing their background color -- to olive green on my terminal; your color may vary. I am looking ...
1
vote
0answers
203 views

Vim background colors render incorrectly

When I scroll inside vim white spaces seem to get highlighted. Also the background color is the one I use to signal the 80 column while it should be the same color as the terminal as it can be seen in ...
2
votes
0answers
35 views

Weird highlighting when navigating vimrc

So I recently downloaded Jellybeans.vim, and it was working fine until today when I opened .vimrc and to add something to the bottom of the file I pressed G , this happened: Then I pressed gg to go ...
5
votes
1answer
289 views

IDE-like inline diff highlighting in Vim

I enjoy using Vim and like it better than IDEs on most points. One common IDE feature that I miss, though, is inline diff highlighting: In this example changed lines are highlighted in blue and ...
4
votes
0answers
38 views

Is it possible to use syn match dynamically

I know that syn match can work with the regular expression to do some custom highlight settings. I'm thinking if it can work dynamically. For example, I'm doing a c++ project and I want to highlight ...
0
votes
0answers
30 views

Lose hlsearch when using with vim-fuzzysearch

I'm using this plugin: vim-fuzzysearch. When I have long file (I need to press ctrl-f/ctrl-b to scroll) Steps to produces: 1. Turn on `hlsearch` + vim-fuzzysearch and search for a keyword 2. ...
0
votes
0answers
33 views

Don't highlight entire line for highlight group

I'd like to change the highlight colors for the QuickFixLine highlight group (something like highlight QuickFixLine term=reverse ctermbg=DarkGrey). Sidenote: the QuickFixLine highlight group is the ...
2
votes
1answer
427 views

Matching parenthesis and such not being highlighted in strings since VIM 8.0 on Ubuntu 18.04, how do I get this highlighting back?

When I place the cursor on the parenthesis of the below line, the two parenthesis get highlighted in a cyan color. When I place the cursor on the curly braces, however, no highlighting happens. // ...
7
votes
2answers
996 views

Enable incremental search and highlight while typing a search term?

While I enter a regular expression on the vim command line, I would like to see what matches the partial expression I already wrote. For example, while writing the command :%s/regular all words ...
0
votes
3answers
225 views

How to completely hide the seperator between windows?

I managed to hide the background of the seperator between open windows by using: hi VertSplit term=NONE cterm=NONE gui=NONE guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NONE However the fillchars ...
4
votes
1answer
219 views

Vim highlighting random indentations

As seen from the image, Vim decides to highlight those indentations for no reason. I've tried :noh and :set nolist (:set list seems to make it go away, but I don't want indentation marks) from a ...
2
votes
1answer
170 views

search highlighting only in the current buffer

I know that I can run a search in vim using /. I prefer having search highlighting turned on, but if I have a two splits with different files open, and I search for a term in one, they get highlighted ...
0
votes
1answer
147 views

change fold sign character

I know per my question remove trailing dashes in foldtext that I can remove the trailing dashes from collapsed fold lines. When a fold is 'open', the sign column has pipe characters '|'. I looked at ...
3
votes
1answer
104 views

Highlighting arbitrary text

When I'm writing, I often have 2-3 buffers open. My main body of text in the middle, and then supporting materials on the left and right. I often read a paragraph from one of the supporting buffers ...
1
vote
2answers
126 views

Highlight range for ex command

I'm trying to add more ex commands to my vim repertoire and I was wondering if there is setting or plugin that would allow to highlight the lines addressed by the command, if a range is give e.g., if ...
2
votes
2answers
325 views

Highlight important words/lines permanently

I'm working on a plain text file. I'd like to highlight important words or lines so that they stand out. How can I change background color and/or text color for selected text or word under cursor? ...
2
votes
0answers
128 views

neovim hlsearch not working

I'm testing neovim and for many thing it is working way faster than vim (I use many plugins ~80, and I can really tell the difference with neovim). All the same config files worked out of the box, but ...
0
votes
2answers
231 views

Is it possible to reverse an existing highlighting group?

Is it possible to automatically create a highlight which is the reverse of an existing highlight? Example highlight Search guifg=Black guibg=Yellow, becomes highlight CustomHighlight guifg=Yellow ...