Questions tagged [highlight]
Adding highlighting to the document other than syntax highlighting (such as hlsearch or :match)
27
questions with no upvoted or accepted answers
7
votes
0answers
599 views
Highlight line number of folded lines
I want to have uniform highlighting of line numbers (provided by the LineNr and CursorLineNr hl-groups) but the line numbers of folded lines don't obey a particular group (as far as I know), but obey ...
5
votes
0answers
43 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 ...
3
votes
0answers
334 views
Is there a way in vim to determine if something is highlighted after search?
What I want to do is make CursorMoved autocmd that would check if there is a search highlight is on and if it is it would start a timer that would deactivate it.
PS
I know about all available ...
2
votes
0answers
46 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 &...
2
votes
0answers
83 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 ...
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 ...
2
votes
0answers
146 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 ...
2
votes
0answers
73 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 ...
2
votes
0answers
394 views
Relative line number colouring
I have relative numbering turned on. There's no immediate way of telling which direction I want to move, however. For example, sometimes I see line number "7" and move 7j (7 lines down) when I really ...
2
votes
0answers
51 views
Syntax highlighting depending on whether whole line is commented
Is it possible to have vim highlight folds differently depending on whether every line in a fold is only comments or whitespace? In that case, how?
2
votes
0answers
816 views
multiple highlight with multiple color
When we search for a word, it gets highlighted.
I want to search for another word keeping the previous one highlighted (with a different color probably).
Please let me know if it's doable.
2
votes
0answers
349 views
Cursor line and cursor column highlighting “priorities” are inconsistent
I have turned on cursorline and cursorcolumn options to highlight cursor line and cursor column, but there is some inconsistency in the behavior. The CursorLine highlighting seems to have a lower ...
1
vote
0answers
18 views
How to use different rules for highlighting trailing whitespace inside a gitcommit diff
In my ~/.vimrc, I have:
highlight TrailingWhitespace ctermbg=blue
autocmd BufReadPost * syn match TrailingWhitespace /\s\+\%#\@<!$/
This highlights trailing spaces, except when I am still typing ...
1
vote
0answers
40 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 ...
1
vote
0answers
114 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 * ...
1
vote
0answers
292 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 ...
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....
1
vote
0answers
30 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
359 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 reverse ...
1
vote
0answers
380 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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
54 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
36 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 ...
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 ...
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
1answer
140 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
0answers
557 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 ...