Ability to move in insert mode added

This commit is contained in:
2024-08-14 04:15:19 +04:00
parent 746fa4ff35
commit 3c76f844f7

View File

@@ -1,15 +1,14 @@
local keymap = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Remap Ctrl + h to move to the left window
-- Remap Ctrl + dir to move window to the dir
keymap("n", "<C-h>", "<C-w>h", opts)
-- Remap Ctrl + j to move to the window below
keymap("n", "<C-j>", "<C-w>j", opts)
-- Remap Ctrl + k to move to the window above
keymap("n", "<C-k>", "<C-w>k", opts)
-- Remap Ctrl + l to move to the right window
keymap("n", "<C-l>", "<C-w>l", opts)
-- Map Ctrl+h, Ctrl+j, Ctrl+k, Ctrl+l to navigation in insert mode
keymap("i", "<C-h>", "<Left>", opts)
keymap("i", "<C-j>", "<Down>", opts)
keymap("i", "<C-k>", "<Up>", opts)
keymap("i", "<C-l>", "<Right>", opts)