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
0answers
34 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 ...
0
votes
1answer
43 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
22 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
15 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
31 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
7 views

Change match hilights 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
23 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 ...
1
vote
1answer
18 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
32 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
284 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
30 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
77 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
22 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
45 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
40 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
26 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
61 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
33 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
241 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
28 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
29 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
29 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
208 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. // ...
6
votes
2answers
688 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
150 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
164 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 ...
1
vote
1answer
103 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
88 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
95 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
93 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
139 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? ...
1
vote
0answers
87 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
145 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 ...
2
votes
1answer
117 views

ALE Error and warning highlighting gets disabled when termguicolors is enabled

I have the ALE extension installed, and would like it to highlight errors and warnings, however when :set termguicolors is enabled, the Here's a screenshot of the problem: set termguicolors ...
1
vote
1answer
362 views

Vim is highlights everything after EOL in yellow upon scrolling

My vimrc: http://ge0rges.com/vimrc My environment is: Ubuntu 18.04 in WSL on Windows 10. VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41) Included patches: 1-1453 Modified by pkg-...
2
votes
0answers
45 views

How to set syntax keywords dynamically

I'm trying to highlight the keywords for my c++ project. So what I've done is to create a file here: ~/.vim/after/syntax/cpp.vim and put some custom configuration into it. For example, putting the ...
1
vote
2answers
521 views

How to highlight class name of c++

I'm trying to configure the highlight to highlight keywords of my C++ project. Here is the content of ~/.vim/syntax/cpp.vim: syn match cCustomParen "?=(" contains=cParen,cCppParen syn match ...
3
votes
1answer
20 views

Register CursorMoved on certain key press and disable when move to new line

I'm trying to write a function that will highlight searches performed with the f and F keys. I currently have a solution here thanks to @filbranden, but would like to further improve it to only ...
2
votes
2answers
84 views

`.vimrc` unsuccessful in setting highlight style

1) To underline misspelled words, I can execute the following in an open buffer: :hi clear SpellBad :hi SpellBad cterm=underline :set spell 2) However, if I write in my .vimrc the first two lines, ...
1
vote
0answers
228 views

How can I still see underscores with cursorline?

Background and problem I've just discovered how to make the cursor a vertical line in insert mode. This works well with cursorline; even with the thinner cursor, I can still easily find my position. ...
0
votes
1answer
94 views

How to disable margin (+/!)?

Currently I installed vim addons for python. http://fisadev.github.io/fisa-vim-config/ However, I don't like the +/-/! on the margin. Does anyone know how to disable all of them? Thanks,
0
votes
2answers
49 views

Fade Rows Far From Center

I am currently using a vertical monitor for my vim setup. I absolutely love being able to view 100+ lines of code at once. My eyes can scan longer and more complicated blocks of code. However, I have ...
1
vote
3answers
1k views

Automatically highlight all occurrences of the selected text in visual mode

In text editors like sublime text, atom and notepad++, when you select a word, all matches are highlighted automatically as shown in the following screenshot of my atom editor: I use v and select ...
1
vote
0answers
33 views

How do you remap keys in :history or :highlight?

I use Colemak hnei for nav in normal mode, but my keys default to hjkl when when I'm viewing :history and :highlight. How do I remap these keys? My guess is that the program may be switching to more....
0
votes
1answer
50 views

How to use vim as an error checker?

I'm transitioning to vim and I love the feature other IDEs provided in which when I wrote something with a syntax error it accuses me through a red underlining. I don't know what this type of feature ...
1
vote
2answers
320 views

Change background color of git conflict marker sections

If git is performing a 3-way merge and has a conflict it can't resolve, it marks up that area of the file like this: No unresolvable conflicts here <<<<<<< HEAD xyz ||||||| ...
0
votes
1answer
83 views

Highlighting screen positions, or `:set colorcolumn` only for the 2 bottom and top lines visible on the screen

The option colorcolumn is really useful. I would like a similar result to what it yields but only for the two lines that are at the top and the bottom of the screen (not the document, but the screen). ...
5
votes
2answers
2k views

How to make vim text bold?

In order to have my vim text always bold, I found this config in stackoverflow: :hi MyGroup cterm=bold :match MyGroup /./ But somehow, it has messed up search highlighting. It is no longer ...