mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-25 16:01:25 -05:00
added key mappings to up/down to do the same as j/k do with the move
plugin, and added mappings for left/right/h/l to move a half page at a time
This commit is contained in:
parent
faad00240f
commit
eb6cfb028c
1 changed files with 199 additions and 171 deletions
|
@ -32,8 +32,10 @@
|
|||
"
|
||||
" Mappings:
|
||||
" (mouse)
|
||||
" <Ctrl-ScrollUp> | (A) -> scroll right
|
||||
" <Ctrl-ScrollDown> | (A) -> scroll left
|
||||
" <Ctrl-ScrollUp> | (A) -> scroll right a few characters at a time
|
||||
" <Ctrl-ScrollDown> | (A) -> scroll left a few characters at a time
|
||||
" <Alt-ScrollUp> | (A) -> scroll right one character at a time
|
||||
" <Alt-ScrollDown> | (A) -> scroll left one character at a time
|
||||
" <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste
|
||||
"
|
||||
" (tabs)
|
||||
|
@ -101,6 +103,20 @@
|
|||
" <Shift-Right> | (N) -> move a few lines right
|
||||
" <Shift-Left> | (N) -> move a few lines left
|
||||
"
|
||||
" <Alt+Up> | (V) -> move a block up one line
|
||||
" <Alt+Down> | (V) -> move a block down one line
|
||||
" <Alt+Up> | (N) -> move a line up one line
|
||||
" <Alt+Down> | (N) -> move a line down one line
|
||||
"
|
||||
" <Alt+Left> | (V) -> move a block up a half page
|
||||
" <Alt+Right> | (V) -> move a block down a half page
|
||||
" <Alt+Left> | (N) -> move a line up a half page
|
||||
" <Alt+Right> | (N) -> move a line down a half page
|
||||
" <Alt+h> | (V) -> move a block up a half page
|
||||
" <Alt+l> | (V) -> move a block down a half page
|
||||
" <Alt+h> | (N) -> move a line up a half page
|
||||
" <Alt+l> | (N) -> move a line down a half page
|
||||
"
|
||||
" (selection)
|
||||
" <Ctrl-a> | (N) -> select all text
|
||||
" <Leader>a | (N) -> select all text
|
||||
|
@ -186,10 +202,16 @@
|
|||
noremap! <S-Insert> <MiddleMouse>
|
||||
|
||||
"hold ctrl to scroll left/right instead of up/down
|
||||
noremap <C-ScrollWheelUp> 3zl
|
||||
noremap <C-ScrollWheelDown> 3zh
|
||||
inoremap <C-ScrollWheelUp> <C-O>3zl
|
||||
inoremap <C-ScrollWheelDown> <C-O>3zh
|
||||
noremap <C-ScrollWheelUp> 4zl
|
||||
noremap <C-ScrollWheelDown> 4zh
|
||||
inoremap <C-ScrollWheelUp> <C-O>4zl
|
||||
inoremap <C-ScrollWheelDown> <C-O>4zh
|
||||
|
||||
"hold alt to scroll left/right more precisely
|
||||
noremap <A-ScrollWheelUp> zl
|
||||
noremap <A-ScrollWheelDown> zh
|
||||
inoremap <A-ScrollWheelUp> <C-O>zl
|
||||
inoremap <A-ScrollWheelDown> <C-O>zh
|
||||
"}
|
||||
|
||||
"TABS:{
|
||||
|
@ -339,6 +361,22 @@
|
|||
nnoremap <C-Down> G$
|
||||
nnoremap <C-Right> $
|
||||
nnoremap <C-Left> ^
|
||||
|
||||
"remap alt+up/down to move blocks up/down a line
|
||||
vmap <A-Up> <Plug>MoveBlockUp
|
||||
vmap <A-Down> <Plug>MoveBlockDown
|
||||
nmap <A-Up> <Plug>MoveLineUp
|
||||
nmap <A-Down> <Plug>MoveLineDown
|
||||
|
||||
"remap alt+left/right/h/l to move blocks up/down a half page
|
||||
vmap <A-Left> <Plug>MoveBlockHalfPageUp
|
||||
vmap <A-Right> <Plug>MoveBlockHalfPageDown
|
||||
nmap <A-Left> <Plug>MoveLineHalfPageUp
|
||||
nmap <A-Right> <Plug>MoveLineHalfPageDown
|
||||
vmap <A-h> <Plug>MoveBlockHalfPageUp
|
||||
vmap <A-l> <Plug>MoveBlockHalfPageDown
|
||||
nmap <A-h> <Plug>MoveLineHalfPageUp
|
||||
nmap <A-l> <Plug>MoveLineHalfPageDown
|
||||
"}
|
||||
|
||||
"SELECTION:{
|
||||
|
@ -451,13 +489,3 @@
|
|||
cabbrev sudoe SudoRead
|
||||
cabbrev esudo SudoRead
|
||||
"}}}
|
||||
|
||||
"TMUX AND SCREEN COMPATIBILITY: SOME HACKS TO MAKE THINGS WORK RIGHT {{{
|
||||
"general compatibility settings for both screen and tmux
|
||||
if $TERM =~ '^screen-256color'
|
||||
nmap <Esc>OH <Home>
|
||||
imap <Esc>OH <Home>
|
||||
nmap <Esc>OF <End>
|
||||
imap <Esc>OF <End>
|
||||
endif
|
||||
"}}}
|
||||
|
|
Loading…
Reference in a new issue