Remove default bindings
Closed this issue · 5 comments
I use kj
as escape, and Ive set that in my config but it seems all of the other default mappings are still in place. Ive had to assign jj
, for example, to false to disable it. Still, a couple of problems with this:
- There is now a very slightly delay when pressing
j
consecutively as I think this plugin still needs to evaluate the mapping on every press? - I have to manually disable all other default mappings for all modes (the config below only works for
jj
)
Could we get an option to disable default mappings altogether?
return {
"max397574/better-escape.nvim",
event = "InsertEnter",
opts = {
timeout = vim.o.timeoutlen,
mappings = {
i = {
j = {
j = false,
},
k = {
j = "<Esc>",
},
},
t = {
j = {
j = false,
},
k = {
j = "<Esc>",
},
},
},
},
}
I can add an option create_default_mappings
which is true by default
For the other issue I have an idea why I can try later (nowait=true).
But I can tell with absolute certainty that I'll be able to fix this
unsure if this is related, but one additional thing ive discovered is that in visual mode, pressing j
quickly will Esc back to normal mode even though the binding has been disabled, also, weirdly, pressing k
consecutively will also Esc out even though that is not in the default config at all
v = {
j = {
j = false,
},
k = {
j = "<Esc>",
},
},
There is now a very slightly delay when pressing j consecutively as I think this plugin still needs to evaluate the mapping on every press?
Is this still an issue ?
added a config option to disable the default mappings
if you still have the other issue please open a separate issue for it