-
|
I installed mini.move plugin and I wanted to set moving line left and right on H and L. I pass the plugin keymaps like this: return {
'echasnovski/mini.move',
event = 'VeryLazy',
keys = {
-- trying to disable H and L keymaps here
{ '<s-h>', false },
{ '<s-l>', false },
},
opts = {
mappings = {
-- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl.
left = 'H',
right = 'L',
down = 'J',
up = 'K',
-- Move current line in Normal mode
line_left = 'H',
line_right = 'L',
-- line_down = 'J',
-- line_up = 'K',
},
},
}But it doesn't help, I still have next, prev buffer keymaps set. How do you think I can disable these two keymaps? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
You can only use The process I usually follow to disable keymaps I don't like, is search through the repo to see where they are defined. For example if you search for So, to disable this keymap as you want, you would have to do it in 2 places as well. First in your own |
Beta Was this translation helpful? Give feedback.
-
|
here's how I do it to map lateral buffer movement to ALT-arrows, I hope it helps: -- lua.config.keymaps
vim.keymap.del("n", "<S-h>")
vim.keymap.del("n", "<S-l>")
vim.keymap.set("n", "<M-Left>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
vim.keymap.set("n", "<M-Right>", "<cmd>bnext<cr>", { desc = "Next buffer" }) |
Beta Was this translation helpful? Give feedback.
It does remove the keymap! Mini.move plugin is fired before lazyvim, so it never applies the keymap through.
In my keys only manually overriding in keys did help: