[Picker] how to close the picker by one shortcut when in insert mode #629
Answered
by
ahmedelgabri
LintaoAmons
asked this question in
Q&A
-
I added a new shortcut win = {
-- input window
input = {
keys = {
["<Esc>"] = "close",
["<C-c>"] = { "close", mode = "i" }, -- this shortcut close the picker window directly from insert mode
["<M-w>"] = { "close", mode = "i" }, -- this shortcut I added need press twice to close the picker window |
Beta Was this translation helpful? Give feedback.
Answered by
ahmedelgabri
Jan 19, 2025
Replies: 1 comment
-
If you search for -- to close the picker on ESC instead of going to normal mode,
-- add the following keymap to your config
-- ["<Esc>"] = { "close", mode = { "n", "i" } }, So you need to add ["<Esc>"] = { "close", mode = { "n", "i" } }, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
folke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you search for
<Esc>
in this part if the readme you will see this https://github.com/folke/snacks.nvim/blob/main/docs/picker.md#%EF%B8%8F-configSo you need to add