4
votes
Accepted
Disable highlighting in location list in vim
The highlight rule you are looking for should be QuickFixLine.
So disabling the background would be done in your .vimrc with:
highlight QuickFixLine ctermbg=none
4
votes
Accepted
How to highlight search with / and ? but not * and # vim
I don't think there's anything better than switching highlight off just after the search:
set hlsearch
nnoremap <silent>* *:noh<CR>
nnoremap <silent># #:noh<CR>
4
votes
Highlight search phrase within quickfix window listing
Two ideas:
If you just want to highlight them, search with /buffer and make sure hlsearch is on. Or, for a more permanent solution, navigate to the quickfix window and use :match Search /buffer/
If ...
3
votes
How to get the highlight group of the word under the cursor in Neovim with Treesitter installed?
Neovim v0.9
The following commands are now available built-in, which do what you want
:Inspect " prints as nicely formatted text
:Inspect! " prints as a lua table
The ...
2
votes
Accepted
Can you call highlight more than once? Need different colors for different matches
About :match
With the match command, you only get 3 match ids:
:match noteHi /\[\cNOTE:[^=]*\]/
:2match todoHi /\[\cTODO:[^=]*\]/
:3match what /ever/
Each time you call these commands for a ...
2
votes
How do I let the user of my plugin customize a custom highlight group I define?
Setting colors to NONE is (almost) the same as inheriting from Normal group. So you can simply test hlID() return value before calling popup_create() and pass "Normal" if the custom group ...
2
votes
Accepted
How do I let the user of my plugin customize a custom highlight group I define?
The recommendation to use the ColorScheme autocommand comes from the fact that color schemes all start with hi clear, which effectively removes any previous hi definition, wherever, whenever, and ...
2
votes
Accepted
How to get the highlight group of the word under the cursor in Neovim with Treesitter installed?
For those using Neovim 0.9.0 (or newer), it now includes a command that does what you asked for (provided by a bundled runtime plugin):
:Inspect
Sources:
https://github.com/neovim/neovim/releases/tag/...
2
votes
Generate relatively unique "cache filename" for given file path (like swap files do)
The swapfile full path is available through swapname() which takes a buffer name. The current buffer name is available with bufname() with no arguments. So this prints the swapfile path of the current ...
2
votes
Accepted
Cannot get rid of persisting highlighting
Most probably you have set spell enabled which usually checks spelling in comments.
If you don't need it turn it off with :set nospell. Activate when you need it with :set spell.
To toggle use :set ...
1
vote
How to get the highlight group of the word under the cursor in Neovim with Treesitter installed?
According to the closed issue at
https://github.com/nvim-treesitter/nvim-treesitter/issues/1654#issuecomment-893756730
Treesitter messes up synstack().
The only way to get a function to do something ...
1
vote
Accepted
How can I check whether the user has defined a highlight group before Vim 8.2.3917
So Vim Patch 8.2.3578 added the ability to get and set the various attributes for highlighting groups in a more efficient manner.
This is strictly speaking not required to check whether or not a ...
1
vote
Persistent highlighting of a passage in Vim
If by "persisted" you mean only in a current vim session (not stored with text file), then :h textprop API might be what you want.
Here is the proof of the concept:
func! Markline(line)
&...
1
vote
Accepted
Upgraded my mac OS and now the vim colors are different. Is there an easy way for me to change the default syntax?
I completely understand your problem. The issue is that the new system is better at detecting the background as being dark. Simply add
set bg=light
to your .vimrc file my friend. That should restore ...
1
vote
Upgraded my mac OS and now the vim colors are different. Is there an easy way for me to change the default syntax?
You can choose a colorscheme and set it in your ~/.vimrc
colorscheme <colorscheme_name>
1
vote
Help writing simple syntax file for line specific matches
I think what you want is found at :help pattern and searching for line number.
/\%l /\%>l /\%<l
\%23l Matches in a specific line.
\%<23l ...
1
vote
Accepted
Can I apply individual colours from one highlight in another one?
I tried it manually and the last line gave me this error:
E254: Cannot allocate color s:splitcolor
So the guifg value isn't set to anything. (The guibg value is set so that may explain why you ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
highlighting × 16highlight × 9
syntax-highlighting × 6
neovim × 2
plugin-system × 2
vimrc × 1
vimscript × 1
regular-expression × 1
search × 1
colorscheme × 1
functions × 1
folding × 1
color × 1
debugging × 1
echo × 1
version × 1
colorcolumn × 1