Hi Jürgen,
I had come up with a solution using self-modifying autocommands:
augroup g1
au!
augroup g2
au!
augroup end
function ShowExtraSpace()
au! g1
sy match ExtraSpace / \+\ze\t\|\t\zs \+\|^ \+\|\s\+$/ containedin=ALL
endfunction
au g1 BufWinEnter,InsertLeave * call ShowExtraSpace()
function
[Quoting re-ordered]
Hi Dave,
ben.k...@gmail.com schrieb am 22.02.2023 um 15:47:
> On Tuesday, February 21, 2023 at 5:01:04 AM UTC-5 Dave McCooey wrote:
>>
>> Hello,
>>
>> I recently added the following autocommands to my _vimrc file:
>>
>> :hi ExtraWhiteSpace ctermbg=58 " Orange4
That’s because your autocommand adds a new syntax match every time you
enter insert mode. That probably increases syntax highlighting times and
makes everything else sluggish. Don’t do that for the same reason we use
autogroups. Just add the new match once per buffer (say, autocmd Syntax *).
O
Hello,
I recently added the following autocommands to my _vimrc file:
:hi ExtraWhiteSpace ctermbg=58 " Orange4 = #5f5f00
autocmd BufWinEnter,InsertLeave * syntax match ExtraWhiteSpace /
\+\ze\t\|\t\zs \+\|^ \+\|\s\+$/ containedin=ALL
autocmd InsertEnter * syntax match ExtraWhiteSpace / \+\ze\t\|