From 1c0a594290e47917c93838630b3170d87dfc2fbe Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 24 Mar 2016 16:07:11 -0400 Subject: [PATCH] Use ctrl + the arrow keys to scroll up/down/left/right without moving the cursor --- vim/config/keyboard.vim | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 6a45103..3debd59 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -222,16 +222,17 @@ " (movement) " = | (N) -> go to the first char on the next line " _ | (N) -> go to the first char on the previous line +" +" | (A) -> scroll up +" | (A) -> scroll down +" | (A) -> scroll right +" | (A) -> scroll left +" " | (N) -> move to the beginning of the document " | (N) -> move to the end of the document " | (N) -> move to the end of the line " | (N) -> move to the beginning of the non-whitespace " -" | (N) -> move four lines up -" | (N) -> move four lines down -" | (N) -> move one word right -" | (N) -> move one word left -" " | (V) -> move a block up one line " | (V) -> move a block down one line " | (N) -> move a line up one line @@ -761,11 +762,31 @@ nnoremap = + nnoremap _ - - "remap keys for speedier movement - nnoremap 4k - nnoremap 4j - nnoremap - nnoremap + "map ctrl+direction to shifting the screen in that direction + noremap + nnoremap + xnoremap + snoremap + vnoremap + inoremap + noremap + nnoremap + xnoremap + snoremap + vnoremap + inoremap + noremap 4zl + nnoremap 4zl + xnoremap 4zl + snoremap 4zl + vnoremap 4zl + inoremap 4zl + noremap 4zh + nnoremap 4zh + xnoremap 4zh + snoremap 4zh + vnoremap 4zh + inoremap 4zh "remap keys to scroll to the end in a direction nnoremap gg0