feat(vim): non-normal state H/I

This commit is contained in:
js0ny 2025-03-20 20:10:53 +00:00
parent 2ae16a5cf8
commit 972dfa8c5e
4 changed files with 39 additions and 16 deletions

View file

@ -13,8 +13,14 @@ endif
noremap n j
noremap e k
noremap i l
noremap N J
noremap E K
nnoremap N 5j
nnoremap E 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
noremap I L
" Similar position to i

View file

@ -8,8 +8,14 @@
noremap n j
noremap e k
noremap i l
noremap N J
noremap E K
nnoremap N 5j
nnoremap E 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
noremap I L
" Similar position to i

View file

@ -54,12 +54,15 @@ local keymaps_basic = { -- Modification of Original Keymap - Colemak
{ mode = mode_arrow, keys = "h", cmd = "h", opts = { desc = "Left", silent = true } },
{ mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
{ keys = "H", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
{ keys = "I", cmd = ":bnext<CR>", opts = { desc = "Next Buffer" } },
{ mode = {"n"}, keys = "H", cmd = "<cmd>bprevious<CR>", opts = { desc = "Previous Buffer" } },
{ mode = {"n"}, keys = "I", cmd = "<cmd>bnext<CR>", opts = { desc = "Next Buffer" } },
{ mode = {"v", "o", "x"}, keys = "H", cmd = "^", opts = { desc = "Start of Line" } },
{ mode = {"v", "o", "x"}, keys = "I", cmd = "$", opts = { desc = "End of Line" } },
{ mode = mode_arrow, keys = "N", cmd = "5j", opts = { desc = "Up 5 Lines" } },
{ mode = mode_arrow, keys = "E", cmd = "5e", opts = { desc = "Down 5 Lines" } },
{ keys = "Y", cmd = "y$", opts = { desc = "Yank to End of Line" } },
{ keys = "E", cmd = "5k" },
{ mode = mode_arrow, keys = "N", cmd = "5j" },
{ mode = mode_arrow, keys = "E", cmd = "5k" },
{ mode = { "n", "o", "x" }, keys = "l", cmd = "i", opts = { desc = "Insert" } },
{ keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
{ mode = mode_arrow, keys = "k", cmd = "n", opts = { desc = "Next Search" } },

View file

@ -17,8 +17,15 @@ noremap e k
noremap i l
" Switch between tabs
noremap H :bprevious<CR>
noremap I :bnext<CR>
nnoremap H :bprevious<CR>
nnoremap I :bnext<CR>
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
noremap N 5j
noremap E 5k
@ -68,10 +75,11 @@ vnoremap > editor.action.indentLines
nmap w cjkWordHandler.cursorWordEndRight
nmap b cjkWordHandler.cursorWordStartLeft
noremap <C-w>n <C-w>j
noremap <C-w>e <C-w>k
noremap <C-w>i <C-w>l
noremap <C-w>x workbench.action.toggleEditorGroupLayout
" Use C-w C-w as original C-w
noremap <C-w><C-w> workbench.action.closeActiveEditor
noremap <C-w><A-n> workbench.action.togglePanel
" <C-w> will be parsed by VSCode itself.
" noremap <C-w>n <C-w>j
" noremap <C-w>e <C-w>k
" noremap <C-w>i <C-w>l
" noremap <C-w>x workbench.action.toggleEditorGroupLayout
" " Use C-w C-w as original C-w
" noremap <C-w><C-w> workbench.action.closeActiveEditor
" noremap <C-w><A-n> workbench.action.togglePanel