How do we have neovim configuration, on normal mode, instead of the keys h-j-k-l, it’d be
j i k l
for moving cursor left, down, up, right respectively while pressing i key to get to editing mode to be remapped to “h” or ENTER key, and pressing INS key ( instead of ESC key or just have it as additonal) to exit from this editing mode ?
vim.keymap.set("n", [[h]], [[i]])
-- Or: vim.keymap.set("n", [[<Cr>]], [[i]])
vim.keymap.set("n", [[i]], [[<Up>]])
-- etc. for other motions
vim.keymap.set("i", [[<Insert>]], [[<Esc>]])
Note that i_<Insert>
is already a mapping by default, you will lose that if you chose this key. Personally, I use <M-;>
(Alt + semicolon) as a shortcut to exit insert mode, becuase the Esc key is too far away on modern keyboards.