mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(vim): non-normal state H/I
This commit is contained in:
parent
2ae16a5cf8
commit
972dfa8c5e
4 changed files with 39 additions and 16 deletions
|
|
@ -13,8 +13,14 @@ endif
|
||||||
noremap n j
|
noremap n j
|
||||||
noremap e k
|
noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
noremap N J
|
nnoremap N 5j
|
||||||
noremap E K
|
nnoremap E 5k
|
||||||
|
vnoremap H ^
|
||||||
|
xnoremap H ^
|
||||||
|
onoremap H ^
|
||||||
|
vnoremap I $
|
||||||
|
xnoremap I $
|
||||||
|
onoremap I $
|
||||||
noremap I L
|
noremap I L
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
|
|
|
||||||
10
common/vimrc
10
common/vimrc
|
|
@ -8,8 +8,14 @@
|
||||||
noremap n j
|
noremap n j
|
||||||
noremap e k
|
noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
noremap N J
|
nnoremap N 5j
|
||||||
noremap E K
|
nnoremap E 5k
|
||||||
|
vnoremap H ^
|
||||||
|
xnoremap H ^
|
||||||
|
onoremap H ^
|
||||||
|
vnoremap I $
|
||||||
|
xnoremap I $
|
||||||
|
onoremap I $
|
||||||
noremap I L
|
noremap I L
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
|
|
|
||||||
|
|
@ -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 = "h", cmd = "h", opts = { desc = "Left", silent = true } },
|
||||||
{ mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
|
{ mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
|
||||||
{ keys = "H", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
{ mode = {"n"}, keys = "H", cmd = "<cmd>bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
||||||
{ keys = "I", cmd = ":bnext<CR>", opts = { desc = "Next 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 = "N", cmd = "5j", opts = { desc = "Up 5 Lines" } },
|
||||||
{ mode = mode_arrow, keys = "E", cmd = "5e", opts = { desc = "Down 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 = "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" } },
|
{ mode = { "n", "o", "x" }, keys = "l", cmd = "i", opts = { desc = "Insert" } },
|
||||||
{ keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
|
{ keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
|
||||||
{ mode = mode_arrow, keys = "k", cmd = "n", opts = { desc = "Next Search" } },
|
{ mode = mode_arrow, keys = "k", cmd = "n", opts = { desc = "Next Search" } },
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,15 @@ noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
|
|
||||||
" Switch between tabs
|
" Switch between tabs
|
||||||
noremap H :bprevious<CR>
|
nnoremap H :bprevious<CR>
|
||||||
noremap I :bnext<CR>
|
nnoremap I :bnext<CR>
|
||||||
|
vnoremap H ^
|
||||||
|
xnoremap H ^
|
||||||
|
onoremap H ^
|
||||||
|
vnoremap I $
|
||||||
|
xnoremap I $
|
||||||
|
onoremap I $
|
||||||
|
|
||||||
|
|
||||||
noremap N 5j
|
noremap N 5j
|
||||||
noremap E 5k
|
noremap E 5k
|
||||||
|
|
@ -68,10 +75,11 @@ vnoremap > editor.action.indentLines
|
||||||
nmap w cjkWordHandler.cursorWordEndRight
|
nmap w cjkWordHandler.cursorWordEndRight
|
||||||
nmap b cjkWordHandler.cursorWordStartLeft
|
nmap b cjkWordHandler.cursorWordStartLeft
|
||||||
|
|
||||||
noremap <C-w>n <C-w>j
|
" <C-w> will be parsed by VSCode itself.
|
||||||
noremap <C-w>e <C-w>k
|
" noremap <C-w>n <C-w>j
|
||||||
noremap <C-w>i <C-w>l
|
" noremap <C-w>e <C-w>k
|
||||||
noremap <C-w>x workbench.action.toggleEditorGroupLayout
|
" noremap <C-w>i <C-w>l
|
||||||
" Use C-w C-w as original C-w
|
" noremap <C-w>x workbench.action.toggleEditorGroupLayout
|
||||||
noremap <C-w><C-w> workbench.action.closeActiveEditor
|
" " Use C-w C-w as original C-w
|
||||||
noremap <C-w><A-n> workbench.action.togglePanel
|
" noremap <C-w><C-w> workbench.action.closeActiveEditor
|
||||||
|
" noremap <C-w><A-n> workbench.action.togglePanel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue