vim --clean
vim9script
set wildmode=noselect:lastused,full
set wildmenu wildoptions=pum,fuzzy pumheight=12
augroup CmdComplete
au!
autocmd CmdlineChanged : {
if getcmdcompltype() != 'shellcmd'
wildtrigger()
endif
}
augroup END
:term hello
Popup menu should not show terminal
https://asciinema.org/a/hYyC3H4iC3I69CkQP9GDrfO4C
The usecase, I don't want to autocomplete with shellcmd
in Windows or WSL as it is very slow there: :!
or :term
might stuck for up to 15 seconds on my machine.
autocmd CmdlineChanged : {
# :! and :term completion is very slow on Windows and WSL, disable it there.
if !((has("win32") || exists("$WSLENV")) && getcmdcompltype() == 'shellcmd')
wildtrigger()
endif
}
@girishji fyi
9.1.1754
debian12,bash
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
It doesn't help if I try to use command name comparisson:
image.png (view on web)—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
To be honest, I wouldn't say this is a bug, but something that might need an improvement.
Either on shellcmd completion speed or figure out the way to tell wildtrigger what cmd completion types it should complete.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Bug: The popup with terminal
should not remain after typing a space.
Why is your comparison logic not working when you type term hello
?
It is possible to run selected OS tasks in the background and abort them if a timeout is exceeded, to avoid delaying autocompletion. However, this adds more complexity.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Why is your comparison logic not working when you type
term hello
?
Because after hello
cmd completion type is file
, not sure why though.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Why is your comparison logic not working when you type
term hello
?Because after
hello
cmd completion type isfile
, not sure why though.
It is the default I think. You don't have to check for cmdtype.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
It is the default I think. You don't have to check for cmdtype.
I only check for getcmdcompltype()
vs 'shellcmd'
:
...
# :! and :term completion is very slow on Windows and WSL, disable it there.
if !((has("win32") || exists("$WSLENV")) && getcmdcompltype() == 'shellcmd')
wildtrigger()
endif
...
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think using string comparison or regex for filtering is more robust.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think using string comparison or regex for filtering is more robust.
I tried it and it doesn't matter, there is always hanging menu left visible.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think using string comparison or regex for filtering is more robust.
vim9script
set wildmode=noselect:lastused,full
set wildmenu wildoptions=pum,fuzzy pumheight=12
augroup CmdComplete
au!
autocmd CmdlineChanged : {
if !(getcmdline() =~ '^terminal')
wildtrigger()
endif
}
augroup END
https://asciinema.org/a/G7kGHbl1BQbJMCnzk2N2FQIgO
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think using string comparison or regex for filtering is more robust.
I tried it and it doesn't matter, there is always hanging menu left visible.
Yes, that’s a bug outside the scope of Vimscript.
You've already solved the ":term might stuck for up to 15 seconds " problem, correct?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
You've already solved the ":term might stuck for up to 15 seconds " problem, correct?
Yes, by not calling wildtrigger()
for :terminal
. So this issue is about popupmenu leftover.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.