diff options
Diffstat (limited to 'neovim-colemak/lua/config/colemak.lua')
-rw-r--r-- | neovim-colemak/lua/config/colemak.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/neovim-colemak/lua/config/colemak.lua b/neovim-colemak/lua/config/colemak.lua new file mode 100644 index 0000000..a3a8d9a --- /dev/null +++ b/neovim-colemak/lua/config/colemak.lua @@ -0,0 +1,29 @@ +local function map(mode, lhs, rhs, opts) + local options = { noremap = true, silent = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.keymap.set(mode, lhs, rhs, options) +end + +map("", "n", "j") +map("", "e", "k") +map("", "i", "l") +map("", "j", "n") +map("", "k", "e") +map("", "l", "i") +map("", "K", "E") +map("", "N", "J") +map("", "E", "K") -- As in 'Explore' documentation +map("", "L", "I") +map("", "I", "L") +map("", "J", "N") + +map("n", "<c-w>h", "<c-w>h") +map("n", "<c-w>n", "<c-w>j") +map("n", "<c-w>e", "<c-w>k") +map("n", "<C-w>i", "<c-w>l") + +-- Kakoune Holdover +map ("n", "gh", "0") +map ("n", "gi", "$") |