Closed jiangyinzuo closed 6 months ago
I use WSL2 and external command completion is extremely slow for me. So I want to disable them in all situations
Both r
and r!
work correctly for me. Can you check if :echo 'r!ls' =~ 'r!'
is 1?
It does pattern match, see line 164 in cmd.vim:if context =~ pat
.
I suspect g: AutoSuggestSetup is not having effect.
Can you do :echo g:AutoSuggestGetOptions()
and check?
Thank you for your hint!
Finally I update my vim config as
autocmd VimEnter * ++once if exists('*g:AutoSuggestSetup') | call g:AutoSuggestSetup({ 'cmd': { 'exclude': ['!'] }}) | endif
and it works correctly for me.
exists('*g:AutoSuggestSetup')
returns 1 but exists('g:AutoSuggestSetup')
returns 0.
g:AutoSuggestSetup
is a function so I should add *
to examine its existence.
I have two use cases for external commands which are:
1)
:!ls
2):r!ls
I have tried using the following commands for disabling both cases:
and
However, they work for
!ls
but don't work for:r!ls
. Can you suggest a way to disable both use cases?