From eb6cfb028ceeced93a417d937ba8842ece043fa4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 7 Apr 2014 00:41:03 -0400 Subject: [PATCH] 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 --- vim/config/keyboard.vim | 370 +++++++++++++++++++++------------------- 1 file changed, 199 insertions(+), 171 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 7d65654..1e098be 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -32,8 +32,10 @@ " " Mappings: " (mouse) -" | (A) -> scroll right -" | (A) -> scroll left +" | (A) -> scroll right a few characters at a time +" | (A) -> scroll left a few characters at a time +" | (A) -> scroll right one character at a time +" | (A) -> scroll left one character at a time " | (A) -> unbind this from vim so xorg can paste " " (tabs) @@ -101,6 +103,20 @@ " | (N) -> move a few lines right " | (N) -> move a few lines left " +" | (V) -> move a block up one line +" | (V) -> move a block down one line +" | (N) -> move a line up one line +" | (N) -> move a line down one line +" +" | (V) -> move a block up a half page +" | (V) -> move a block down a half page +" | (N) -> move a line up a half page +" | (N) -> move a line down a half page +" | (V) -> move a block up a half page +" | (V) -> move a block down a half page +" | (N) -> move a line up a half page +" | (N) -> move a line down a half page +" " (selection) " | (N) -> select all text " a | (N) -> select all text @@ -181,218 +197,240 @@ "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "MOUSE:{ - "hold shift to enable middle-click paste - noremap - noremap! + "hold shift to enable middle-click paste + noremap + noremap! - "hold ctrl to scroll left/right instead of up/down - noremap 3zl - noremap 3zh - inoremap 3zl - inoremap 3zh + "hold ctrl to scroll left/right instead of up/down + noremap 4zl + noremap 4zh + inoremap 4zl + inoremap 4zh + + "hold alt to scroll left/right more precisely + noremap zl + noremap zh + inoremap zl + inoremap zh "} "TABS:{ - nnoremap 0 ':tabnext' - inoremap 0 ':tabnext' - xnoremap 0 ':tabnext' - nnoremap 9 ':tabprev' - inoremap 9 ':tabprev' - xnoremap 9 ':tabprev' - nnoremap - ':tabnew' - inoremap - ':tabnew' - xnoremap - ':tabnew' - nnoremap = ':VimFiler -tab -project' - inoremap = ':VimFiler -tab -project' - xnoremap = ':VimFiler -tab -project' - nnoremap + ':VimFiler -tab -project -double' - inoremap + ':VimFiler -tab -project -double' - xnoremap + ':VimFiler -tab -project -double' + nnoremap 0 ':tabnext' + inoremap 0 ':tabnext' + xnoremap 0 ':tabnext' + nnoremap 9 ':tabprev' + inoremap 9 ':tabprev' + xnoremap 9 ':tabprev' + nnoremap - ':tabnew' + inoremap - ':tabnew' + xnoremap - ':tabnew' + nnoremap = ':VimFiler -tab -project' + inoremap = ':VimFiler -tab -project' + xnoremap = ':VimFiler -tab -project' + nnoremap + ':VimFiler -tab -project -double' + inoremap + ':VimFiler -tab -project -double' + xnoremap + ':VimFiler -tab -project -double' "} "TOGGLES:{ - "bindings to trigger vimfiler - nnoremap `` ':VimFilerExplorer -direction=botright -winwidth=45' - nnoremap ~~ ':VimFilerExplorer -direction=topleft -winwidth=45' + "bindings to trigger vimfiler + nnoremap `` ':VimFilerExplorer -direction=botright -winwidth=45' + nnoremap ~~ ':VimFilerExplorer -direction=topleft -winwidth=45' - nnoremap ?? ':h quickref' - nnoremap ?> ':exusage' - nnoremap ?< ':viusage' + nnoremap ?? ':h quickref' + nnoremap ?> ':exusage' + nnoremap ?< ':viusage' - "toggle folded code at foldpoints - nnoremap za + "toggle folded code at foldpoints + nnoremap za - "unmap F1 from help then map it to toggle the display of line numbers - nnoremap ':set number!:echo "Line numbers toggled"' - xnoremap ':set number!v' - inoremap ':set number!' + "unmap F1 from help then map it to toggle the display of line numbers + nnoremap ':set number!:echo "Line numbers toggled"' + xnoremap ':set number!v' + inoremap ':set number!' - "toggle the cursor line and column - nnoremap ':set cursorline! cursorcolumn!:echo "Cursor crosshair toggled"' - xnoremap ':set cursorline! cursorcolumn!v' - inoremap ':set cursorline! cursorcolumn!' + "toggle the cursor line and column + nnoremap ':set cursorline! cursorcolumn!:echo "Cursor crosshair toggled"' + xnoremap ':set cursorline! cursorcolumn!v' + inoremap ':set cursorline! cursorcolumn!' - "toggle line wrapping (and bottom bar if using the gui) - nnoremap ':echo "Line wrapping toggled":set wrap!' - xnoremap ':set wrap!v' - inoremap ':set wrap!' + "toggle line wrapping (and bottom bar if using the gui) + nnoremap ':echo "Line wrapping toggled":set wrap!' + xnoremap ':set wrap!v' + inoremap ':set wrap!' - "toggle all folds - nnoremap zi:echo "Code Folding Toggled" - xnoremap ziv - inoremap zi + "toggle all folds + nnoremap zi:echo "Code Folding Toggled" + xnoremap ziv + inoremap zi - "toggle spellcheck - nnoremap ':set spell!:echo "Spell checking toggled"' - xnoremap ':set spell!v' - inoremap ':set spell!' + "toggle spellcheck + nnoremap ':set spell!:echo "Spell checking toggled"' + xnoremap ':set spell!v' + inoremap ':set spell!' - "toggle syntax checking - nnoremap ':SyntasticToggleMode' - xnoremap ':SyntasticToggleModev' - inoremap ':SyntasticToggleMode' + "toggle syntax checking + nnoremap ':SyntasticToggleMode' + xnoremap ':SyntasticToggleModev' + inoremap ':SyntasticToggleMode' - "bindings to trigger the tagbar list of tags - nnoremap ':TagbarToggle:echo "Code tagbar toggled"' - xnoremap ':TagbarTogglev' - inoremap ':TagbarToggle' + "bindings to trigger the tagbar list of tags + nnoremap ':TagbarToggle:echo "Code tagbar toggled"' + xnoremap ':TagbarTogglev' + inoremap ':TagbarToggle' - "bindings to trigger the tagbar list of errors - nmap