河北邀请各地游客共赴“千年牡丹之约”
44 questions with no upvoted or accepted answers
8
votes
0
answers
912
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
0
answers
201
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 ...
4
votes
1
answer
259
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 ...
3
votes
1
answer
161
views
How to call incremental forward/reverse search inside function in Neovim?
I'm trying to implement a search function that finds a pattern and jumps to it without overriding the current searched for & highlighted pattern.
Specifically, I want to be able to type out the ...
3
votes
0
answers
590
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 ...
3
votes
0
answers
1k
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
0
answers
317
views
Highlight groups stop working after sourcing vimrc
I'm working on a todo plugin for Neovim, using the remote plugin API.
I set highlight groups and matching patterns in my script, and then register it with call remote#host#RegisterPlugin. When Neovim ...
2
votes
0
answers
62
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
0
answers
1k
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
0
answers
69
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
0
answers
599
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
0
answers
194
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
0
answers
59
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
0
answers
443
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
0
answers
47
views
How to stop LSP from turning an entire uncompleted method call red?
When I write a method but don't finish it, the language server gets mad and turns the whole thing red, making it difficult to read. I don't have any screenshots because my computer can't currently ...