Closed ycpss91255 closed 7 months ago
Hi, it's because the imap
of <C-h>
is overrided to empty keymap by autoclose.nvim
(check this by verbose imap <C-H>
).
If you remap imap <C-H> <C-W>
after this plugin loaded, it will works normally.
(PS: <C-BS>
is the same with <C-H>
, just set <C-H>
then the both work well.)
Workaround: modify lua/user/event.lua
local definitions = {
-- Example
bufs = {
{ "BufWritePre", "COMMIT_EDITMSG", "setlocal noundofile" },
},
inserts = {
{ "InsertEnter", "*", "imap <C-H> <C-w>" },
},
}
return definitions
Thank you for your reply, but I want to ask, using inoremap
does not work properly, how to modify it?
lua/user/enent.lua
local definitions = {
-- Example
bufs = {
{ "BufWritePre", "COMMIT_EDITMSG", "setlocal noundofile" },
},
inserts = {
{ "InsertEnter", "*", "inoremap <C-H> <C-w>" },
},
}
return definitions
inoremap
works for me too.
Suddenly I cam do it too, thank you
Version confirmation
Following prerequisites
Neovim version
NVIM v0.9.4
Branch info
main (Default/Latest)
Minimal (user) folder structure required to reproduce the issue
Minimal config with steps on how to reproduce the issue
This is my config('core.lua'):
Expected behavior
Equivalent to in insert mode.
I can use nvim command mode and enter
:imoremap <C-H> <C-w>
and it will be successful.Additional information
No response