Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [highlight]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
568 views

How to use a variable value in a colorscheme

I'm trying to make a colorscheme configurable where I define the style in a variable defined in my .vimrc. let g:plugin_style='<vim-highlighting-style>' Then in the colorscheme I'm doing: ...
1
vote
2answers
166 views

Keep matchadd and matchaddpos up to date after file changes

I'm trying to write a plugin to highlight overused words in a file. After this question I now have a way to highlight the most frequent words in each paragraph. To restrict the highlighting of a word ...
1
vote
1answer
60 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-...
1
vote
2answers
42 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 ...
1
vote
0answers
65 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. ...
1
vote
0answers
32 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....
1
vote
2answers
432 views

How to set CursorLine highlight color for the gruvbox colorscheme

When I use the colorscheme gruvbox (installed with vim-plug), it overrides my configuration of the Cursorline highlight, eg set cursorline hi CursorLine cterm=NONE ctermbg=black with the same color ...
1
vote
0answers
25 views

Highlight semicolmns when editting lua files [duplicate]

I program in both C and Lua and therefore sometimes add a semicolmn in my Lua files. This is allowed by the standard, but my company's guidelines forbid semicolmns in lua code. Therefore, I would like ...
1
vote
0answers
323 views

CursorLineNR highlight not working

I have a vim configuration file (~/.vimrc) with the following settings: colo delek syntax on highlight clear CursorLine highlight clear CursorLineNR highlight clear LineNR highlight LineNR cterm=...
1
vote
0answers
24 views

Syntax - Match word based on a previous match

I want to highlight all words that have been matched in another syntax region. Using something similar to regex capture groups, for example given a file: {highlightme} asda asasd asd asd as ...
1
vote
0answers
215 views

Normal highlight group changes cursor color in vim in xterm

I set the following highlight: :hi Normal ctermfg=250 ctermbg=235 The text is a nice light gray on dark gray, as intended. But the cursor has become dark blue. I'd love to have it just be the ...
1
vote
0answers
308 views

Set highlighted token to blink during search and replace

When I do a global search and replace with confirm (e.g., :s/t/s/gc) I have a lot of trouble seeing which of many occurrences is currently under the cursor. I've tried the usual tricks, e.g., hi ...
1
vote
0answers
31 views

VIMRC changing Search Highlighting [duplicate]

My current VIMRC contains the below. I am using the correct colorscheme but it is not accepting my changes for the terminal search highlighting. If I input the :hi command by hand it works. Do I need ...
0
votes
2answers
231 views

Priority highlighting

In my code, something like #include <whatever> is highlighted: #include (which belongs to the group 'cInclude') in pink; and <whatever> (belonging to the group 'cIncluded') in red. (Edit:...
0
votes
2answers
785 views

How to change the cursor line higlighting only for one window (namely the quickfix one)?

I want the cursor line in the quickfix window to be more distinguishable, than in other windows. Initially I thought that there has to be some different highlight group, it seemly turned out to be ...
0
votes
1answer
1k views

vim setting bold color hightlight

Everywhere the highlight shows bold, it has a color of light yellow on my white background. This is not bold. Its unreadable. Is there anywhere I can change this color? I can clear the highlight where ...
0
votes
2answers
42 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 ...
0
votes
1answer
46 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
32 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 ...
0
votes
1answer
276 views

Why doesn't undercurl use underline in my terminal?

:help undercurl states: "undercurl" is a curly underline. When "undercurl" is not possible then "underline" is used. In general "undercurl" and "strikethrough" is only available in the GUI. But if ...
0
votes
1answer
87 views

Highlight lines above cursor

I was looking for a way to highlight lines above the cursor line to mark them as done, whatever that means in the context of what I'm doing. I came up with this match Comment /\_.*\%#.*/ or, in words,...
0
votes
1answer
461 views

Highlight word on double click and copy to clipboard

I am using this excellent solution by Peter Rinker to highlight all occurrences of a word on double clicking. nnoremap <silent> <2-LeftMouse> :let @/='\V\<'.escape(expand('<cword>...
0
votes
1answer
52 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). ...
0
votes
1answer
380 views

Change working directory color in NERDTree

Is there any ways to change the font color and background of the working directory as seen in Sublime text? Sublime Text Neovim with NERDTree
0
votes
1answer
118 views

Fold: highlight folded text only

I expected the folded text highlighted as below picture (ignore red rectangle): Like above picture, I'd like to have something to recognize that red region of a fold and highlight it only, donot have ...
0
votes
1answer
167 views

Vim highlighting in textfiles

I am a relative new user to vim. I started using it along with a newly set up arch installation. So when I created different netctl profiles in vim, it highlighted the parameters like shown in the ...
0
votes
2answers
220 views

Highlighting a search capture group

By :set hl, the search result of a / expression is highlighted, for example: And if one wants to replace one substring distinguished by its surrounding, one can do so elegantly using regex capture ...
0
votes
1answer
47 views

How to apply a custom highlight file?

I'm playing with Vim highlight, so I made the following (syntax.vim): hi Comment ctermfg=DarkGray hi LineNR ctermfg=DarkGray hi CursorLineNR ctermfg=Red hi String ctermfg=Gray hi PreProc ctermfg=...
0
votes
3answers
2k views

How to highlight multiple lines?

When review code, it would be convenient if we can highlight multiple lines at the same time, instead of only current cursor line is highlighted. :set cursorline only highlight current line. :...
0
votes
1answer
38 views

How to color the selected character with red instead of changing it?

In my .vimrc,f5 was binded with CheckMark function to change all 。 into .. function! CheckMark() if search('。') let s:line=search('。') execute s:line . "s/。/\./g" endif ...
0
votes
1answer
61 views

Enable %-key jumping/highlighting for backticks (`) and single-quotes (') in M4 files

Background When working on .c and .h files, I have a couple options turned on, namely: filetype plugin on filetype indent on autocmd BufEnter *.c setlocal tabstop=8 shiftwidth=8 softtabstop=8 ...
0
votes
1answer
708 views

Override highlight group settings with default values

I am writing a plugin that highlights buffer settings violations. I use matchadd() function. In addition I need to add patterns that are force ignored. In order to achieve that I use priorities in ...
0
votes
0answers
39 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
1answer
32 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 ...
0
votes
0answers
79 views

Highlight specific line numbers in the gutter

Can you target a spesific line number in the gutter? Let's say I want line 20 in the gutter te be red for some reason. Possible? Like CursorLineNr, but defining the line number yourself. In short I'm ...
0
votes
1answer
69 views

Fold: Different highlight style for fold of each filetype

Extend of this question of fold: Fold: foldtext() for each filetype We have fold for each filetype now but each fold need different highlight style of color, because highlight is global I tried to ...
0
votes
1answer
248 views

Vim highlights closed folds

Vim has this odd behaviour: when I launch it in a terminal emulator under X, it highlights closed folds, but when I launch it in console, closed folds' representation is more sensible: they are just ...
0
votes
0answers
468 views

How to color the column right after the line numbers and before the beginning of line?

Would be nice to color the single column just left of the beginning of the line, but I don't think it has a group name like CursorLine. Anyone have any ideas? Maybe some simple macro would do, using ...
-1
votes
1answer
45 views

hidden highlight selection when search with * or # is active [duplicate]

Using the * key searches for the word under the cursor. Use # to do the same, backwards. When search is active, all instances of word appears highlighted. I want to know if is possible to remove the ...
-1
votes
1answer
122 views

Automatic highlighting non ASCII character when loading 'vim' filetype buffer

I want to include a new highlight group and autocommand that will automatically highlight non-ASCIIs as soon as either a vimscript or a Python file is loaded in buffer (i.e. any file with filetype '...