mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-23 20:14:11 -05:00
Use alt+direction for screen movement instead of alt+arrows
This commit is contained in:
parent
93ecc605e6
commit
3afbf830b8
3 changed files with 43 additions and 40 deletions
|
@ -109,7 +109,7 @@ A more complete list of key bindings exists at the top of `vim/config/keyboard.v
|
||||||
|
|
||||||
### Complete Reference
|
### Complete Reference
|
||||||
|
|
||||||
For a complete list of mappings specific to **darkcloud-nvimconfig**, check the list in the comments at the top of [vim/config/keyboard.vim](https://github.com/prurigro/darkcloud-nvimconfig/blob/master/vim/config/keyboard.vim)
|
For a complete list of mappings specific to **darkcloud-nvimconfig**, check the list in the comments at the top of [vim/config/keyboard.vim](https://github.com/prurigro/darkcloud-nvimconfig/blob/master/vim/config/keyboard.vim) and the various plugin configs.
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
|
|
|
@ -127,21 +127,16 @@
|
||||||
" <Ctrl-Right> | (N) -> move one word right
|
" <Ctrl-Right> | (N) -> move one word right
|
||||||
" <Ctrl-Left> | (N) -> move one word left
|
" <Ctrl-Left> | (N) -> move one word left
|
||||||
"
|
"
|
||||||
" <Alt-Up> | (A) -> move the screen up
|
" <Alt-k> | (A) -> move the screen up
|
||||||
" <Alt-Down> | (A) -> move the screen down
|
" <Alt-j> | (A) -> move the screen down
|
||||||
" <Alt-Right> | (A) -> move the screen to the right
|
" <Alt-l> | (A) -> move the screen to the right
|
||||||
" <Alt-Left> | (A) -> move the screen to the left
|
" <Alt-h> | (A) -> move the screen to the left
|
||||||
"
|
"
|
||||||
" <Shift-Up> | (N) -> move to the beginning of the document
|
" <Shift-Up> | (N) -> move to the beginning of the document
|
||||||
" <Shift-Down> | (N) -> move to the end of the document
|
" <Shift-Down> | (N) -> move to the end of the document
|
||||||
" <Shift-Right> | (N) -> move to the end of the line
|
" <Shift-Right> | (N) -> move to the end of the line
|
||||||
" <Shift-Left> | (N) -> move to the beginning of the non-whitespace
|
" <Shift-Left> | (N) -> move to the beginning of the non-whitespace
|
||||||
"
|
"
|
||||||
" <Shift-Ctrl-Up> | (V) -> vim-move: move a block up one line
|
|
||||||
" <Shift-Ctrl-Down> | (V) -> vim-move: move a block down one line
|
|
||||||
" <Shift-Ctrl-Up> | (N) -> vim-move: move a line up one line
|
|
||||||
" <Shift-Ctrl-Down> | (N) -> vim-move: move a line down one line
|
|
||||||
"
|
|
||||||
" ]g | (N) -> next difference (vimdiff/signify)
|
" ]g | (N) -> next difference (vimdiff/signify)
|
||||||
" [g | (N) -> previous difference (vimdiff/signify)
|
" [g | (N) -> previous difference (vimdiff/signify)
|
||||||
" >> | (N) -> next difference (vimdiff/signify)
|
" >> | (N) -> next difference (vimdiff/signify)
|
||||||
|
@ -499,30 +494,30 @@
|
||||||
nnoremap <C-Left> <S-Left>
|
nnoremap <C-Left> <S-Left>
|
||||||
|
|
||||||
"map alt+direction to moving the viewport in that direction
|
"map alt+direction to moving the viewport in that direction
|
||||||
noremap <A-Up> <ScrollWheelUp>
|
noremap <A-k> <ScrollWheelUp>
|
||||||
nnoremap <A-Up> <ScrollWheelUp>
|
nnoremap <A-k> <ScrollWheelUp>
|
||||||
xnoremap <A-Up> <ScrollWheelUp>
|
xnoremap <A-k> <ScrollWheelUp>
|
||||||
snoremap <A-Up> <ScrollWheelUp>
|
snoremap <A-k> <ScrollWheelUp>
|
||||||
vnoremap <A-Up> <ScrollWheelUp>
|
vnoremap <A-k> <ScrollWheelUp>
|
||||||
inoremap <A-Up> <ScrollWheelUp>
|
inoremap <A-k> <ScrollWheelUp>
|
||||||
noremap <A-Down> <ScrollWheelDown>
|
noremap <A-j> <ScrollWheelDown>
|
||||||
nnoremap <A-Down> <ScrollWheelDown>
|
nnoremap <A-j> <ScrollWheelDown>
|
||||||
xnoremap <A-Down> <ScrollWheelDown>
|
xnoremap <A-j> <ScrollWheelDown>
|
||||||
snoremap <A-Down> <ScrollWheelDown>
|
snoremap <A-j> <ScrollWheelDown>
|
||||||
vnoremap <A-Down> <ScrollWheelDown>
|
vnoremap <A-j> <ScrollWheelDown>
|
||||||
inoremap <A-Down> <ScrollWheelDown>
|
inoremap <A-j> <ScrollWheelDown>
|
||||||
noremap <A-Right> 4zl
|
noremap <A-l> 4zl
|
||||||
nnoremap <A-Right> 4zl
|
nnoremap <A-l> 4zl
|
||||||
xnoremap <A-Right> 4zl
|
xnoremap <A-l> 4zl
|
||||||
snoremap <A-Right> 4zl
|
snoremap <A-l> 4zl
|
||||||
vnoremap <A-Right> 4zl
|
vnoremap <A-l> 4zl
|
||||||
inoremap <A-Right> <C-O>4zl
|
inoremap <A-l> <C-O>4zl
|
||||||
noremap <A-Left> 4zh
|
noremap <A-h> 4zh
|
||||||
nnoremap <A-Left> 4zh
|
nnoremap <A-h> 4zh
|
||||||
xnoremap <A-Left> 4zh
|
xnoremap <A-h> 4zh
|
||||||
snoremap <A-Left> 4zh
|
snoremap <A-h> 4zh
|
||||||
vnoremap <A-Left> 4zh
|
vnoremap <A-h> 4zh
|
||||||
inoremap <A-Left> <C-O>4zh
|
inoremap <A-h> <C-O>4zh
|
||||||
|
|
||||||
"remap keys to scroll to the end in a direction
|
"remap keys to scroll to the end in a direction
|
||||||
nnoremap <S-Up> gg0
|
nnoremap <S-Up> gg0
|
||||||
|
@ -530,12 +525,6 @@
|
||||||
nnoremap <S-Right> $
|
nnoremap <S-Right> $
|
||||||
nnoremap <S-Left> ^
|
nnoremap <S-Left> ^
|
||||||
|
|
||||||
"remap shift+ctrl+up/down to move blocks up/down a line with vim-move
|
|
||||||
vmap <S-C-Up> <Plug>MoveBlockUp
|
|
||||||
vmap <S-C-Down> <Plug>MoveBlockDown
|
|
||||||
nmap <S-C-Up> <Plug>MoveLineUp
|
|
||||||
nmap <S-C-Down> <Plug>MoveLineDown
|
|
||||||
|
|
||||||
"move to next/previous difference (vimdiff/signify)
|
"move to next/previous difference (vimdiff/signify)
|
||||||
nmap ]g <plug>(signify-next-hunk)
|
nmap ]g <plug>(signify-next-hunk)
|
||||||
nmap [g <plug>(signify-prev-hunk)
|
nmap [g <plug>(signify-prev-hunk)
|
||||||
|
|
14
vim/config/plugins/vim-move.vim
Normal file
14
vim/config/plugins/vim-move.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
"don't use default mappings
|
||||||
|
let g:move_map_keys = 0
|
||||||
|
|
||||||
|
"visual mode mappings
|
||||||
|
vmap <S-C-Up> <Plug>MoveBlockUp
|
||||||
|
vmap <S-C-Down> <Plug>MoveBlockDown
|
||||||
|
vmap <S-C-Right> <Plug>MoveBlockRight
|
||||||
|
vmap <S-C-Left> <Plug>MoveBlockLeft
|
||||||
|
|
||||||
|
"normal mode mappings
|
||||||
|
nmap <S-C-Up> <Plug>MoveLineUp
|
||||||
|
nmap <S-C-Down> <Plug>MoveLineDown
|
||||||
|
nmap <S-C-Right> <Plug>MoveCharRight
|
||||||
|
nmap <S-C-Left> <Plug>MoveCharLeft
|
Loading…
Reference in a new issue