-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmdline fallback for <Esc>
sometimes invokes the command
#547
Comments
More context: neovim/neovim#21585 Seems like no one knows why it works this way |
Thanks for the info. That describes exactly what's going on here.
(The command and/or key combinations I prefer tend to be haunted for one legacy reason or another 😆) |
Closing since it seems like there's nothing to do on our side |
With a little bit of help from my friend Claude, I was able to solve that. keymap = {
preset = "super-tab",
cmdline = {
preset = "super-tab",
["<esc>"] = {
"cancel",
function()
if vim.fn.getcmdtype() ~= "" then
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-c>", true, true, true), "n", true)
return
end
end,
},
},
},
|
slightly better solution that doesnt require a template: keymap = {
cmdline = {
["<ESC>"] = {
function(cmp)
if cmp.is_visible() then
cmp.cancel()
else
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-c>", true, true, true), "n", true)
end
end,
},
},
} |
Make sure you have done the following
blink.cmp
Bug Description
When I define
typing
:q
followed by<Esc><Esc>
will invoke:q
for some reason.When 'fallback' isn't used, this doesn't seem to happen but then you can't exit the command-line with Esc.
More detail: https://youtu.be/DBc5DhH0moA
Relevant configuration
neovim version
NVIM v0.11.0-dev-1351+gf9dd682621 Build type: Release LuaJIT 2.1.1732813678
blink.cmp
version: branch, tag, or commit97989c8
The text was updated successfully, but these errors were encountered: