Skip to content

Commit a205b8a

Browse files
committed
feat(neovim): rework arrow keys
1 parent fc02b68 commit a205b8a

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

home/.config/nvim/plugin/autocomplete.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ defer.on_load("cmp", function()
3636
-- help complete_CTRL-Y
3737
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
3838

39-
["<C-n>"] = cmp.config.disable,
40-
["<C-p>"] = cmp.config.disable,
39+
-- ["<C-n>"] = cmp.config.disable,
40+
-- ["<C-p>"] = cmp.config.disable,
4141

4242
["<C-k>"] = cmp.mapping(prev_item, { "i", "c" }),
4343
["<C-j>"] = cmp.mapping(next_item, { "i", "c" }),

home/.vim/plugin/skipit.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" Since S-Tab is not recognized in console mode map to another keyB
2-
silent! imap <unique> <C-n> <Plug>(SkipItForward)
3-
silent! imap <unique> <C-p> <Plug>(SkipItBack)
4-
silent! imap <unique> <C-g>n <Plug>(SkipAllForward)
5-
silent! imap <unique> <C-g>p <Plug>(SkipAllBack)
2+
silent! imap <unique> <C-Right> <Plug>(SkipItForward)
3+
silent! imap <unique> <C-Left> <Plug>(SkipItBack)
4+
silent! imap <unique> <S-Right> <Plug>(SkipAllForward)
5+
silent! imap <unique> <S-Left> <Plug>(SkipAllBack)

home/.vimrc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,22 @@ nnoremap <silent> <C-s> <cmd>w<CR>
7878
" If you type <ESC>; quickly enough, the key sequence generated will be <M-;>
7979
inoremap <M-;> <ESC>:
8080
81-
" Unmap the arrow keys
8281
no <s-down> ddp
83-
no <left> <Nop>
84-
no <right> <Nop>
8582
no <s-up> ddkP
86-
ino <down> <Nop>
87-
ino <left> <Nop>
88-
ino <right> <Nop>
89-
ino <up> <Nop>
90-
vno <down> <Nop>
91-
vno <left> <Nop>
92-
vno <right> <Nop>
93-
vno <up> <Nop>
83+
84+
" Unmap the arrow keys (useful for practice)
85+
"no <up> <Nop>
86+
"no <down> <Nop>
87+
"no <left> <Nop>
88+
"no <right> <Nop>
89+
"ino <down> <Nop>
90+
"ino <left> <Nop>
91+
"ino <right> <Nop>
92+
"ino <up> <Nop>
93+
"vno <down> <Nop>
94+
"vno <left> <Nop>
95+
"vno <right> <Nop>
96+
"vno <up> <Nop>
9497

9598
"I really hate that things don't auto-center
9699
" nnoremap G Gzz

0 commit comments

Comments
 (0)