Update keymaps.lua

This commit is contained in:
Balavignesh 2023-05-27 01:49:40 +05:30 committed by GitHub
parent a3ec4c21f7
commit 874d44abbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,10 @@ local function map(mode, lhs, rhs, opts)
end end
end end
-- Esc Alternative Insert -> Normal
map("i", "jk", "<ESC>", { desc = "For Insert -> Normal" })
map("i", "kj", "<ESC>", { desc = "For Insert -> Normal" })
-- better up/down -- better up/down
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })