"============================================================" " " " Darkcloud Vim Config: keyboard settings " " " " Maintainer: Prurigro (prurigro-at-gmail-dot-com) " " Website: https://github.com/prurigro/darkcloud-vimconfig " " " " License: MIT " " " "============================================================" " " Note: " *The default key is: \ " " Aliases: " :GitLog & :gitlog | (C) -> show a navigatable log of commit history " :wsudo & :sudow | (C) -> write the file as root using sudo " :esudo & :sudoe | (C) -> read a file as root using sudo " " Reference: (view plugin documentation for the full list of commands each offers) " (tcomment _ can also be -) " | (A) -> comment selection/create an empty comment " b | (A) -> comment the current block(s) " r | (A) -> comment everything on the line to the right " p | (A) -> comment the current paragraph " | (I) -> add a close bracket following an open one " | (I) -> add a close bracket following an open one " + | (V) -> increase the selected region " _ | (V) -> decrease the selected region " " (surround) " S" | (V) -> surround selection with quotes " S | (V) -> surround selection " ds" | (N) -> delete surrounding "" " dst | (N) -> delete surrounding tag (ie: ) " cs'" | (N) -> change surrounding '' to "" (any delimiters work) " cs" | (N) -> change surrounding "" to the tag: " cst" | (N) -> change any surrounding tag to "" " " (vim) " D | (N) -> delete/cut to the end of the line " S | (N) -> delete/cut a line up to the whitespace " " Mappings: " (mouse) " | (N) -> select the current line in normal mode " | (I) -> select the current line in input mode " " | (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 " " | (N) -> select the current paragraph in normal mode " | (V) -> select the current paragraph in visual mode " | (I) -> select the current paragraph in input mode " " (tabs) " 9 | (A) -> go to the next open tab " 0 | (A) -> go to the previous open tab " - | (A) -> open a new tab " = | (A) -> create a new tab with vimfiler " + | (A) -> create a new tab with vimfiler " " (toggles) " ?? | (N) -> toggle the quick reference sidebar " ?> | (N) -> toggle command reference sidebar " ?< | (N) -> toggle normal mode key bindings reference sidebar " `` | (N) -> toggle the vimfiler sidebar on the right " ~~ | (N) -> toggle the vimfiler sidebar on the left " | (N) -> toggle folds " | (A) -> toggle line numbers " | (A) -> toggle row/column cursor highlighting " | (A) -> toggle line wrapping " | (A) -> toggle all folds " | (A) -> toggle spell check " | (A) -> toggle syntax checking " | (A) -> toggle version control differences " | (A) -> toggle version control commit history " | (A) -> toggle the tagbar sidebar " | (A) -> toggle the location list to check syntax errors " | (A) -> toggle the gundo undo history sidebar " | (A) -> enable spellcheck & toggle list of spelling errors " " (gvim toggles) " | (A) -> toggle the menu " | (A) -> toggle the toolbar " | (A) -> toggle the scrollbar " " (completion) " ,, | (A) -> enter after emme 'word' (ie: html:5) " \\ | (N) -> show spelling suggestions popup for word " \| | (N) -> add word to a local list of correct spellings " | (I) -> (neocomp) autocomplete using common string " | (I) -> (neocomp) autocomplete the common string " | (I) -> (neocomp) close the suggestion popup " | (I) -> (neocomp) undo the most recent completion " " (formatting) " | (V) -> deletes currently selected text " | (N) -> deletes the character behind the cursor " | (V) -> format the selection and return to cursor " | (N) -> format document and return to cursor " | (N) -> remove whitespace " | (N) -> convert tabs into spaces " \ | (N) -> remove search highlighting " | (N) -> an alt mapping to remove search highlighting " | (V) -> indent all the lines currently selected " | (N) -> indent the current line " | (V) -> unindent all the lines currently selected " | (N) -> unindent the current line " " (movement) " = | (N) -> move to the first character on the next line " | (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 a few lines up " | (N) -> move a few lines down " " | (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 " " >> | (N) -> next difference (vimdiff/signify) " << | (N) -> previous difference (vimdiff/signify) " " (selection) " | (N) -> select all text " a | (N) -> select all text " | (V) -> select all text " a | (V) -> select all text " " | (V) -> select all text above " | (V) -> select all text below " | (V) -> select all text to the right " | (V) -> select all text to the left up to the indent " " | (V) -> select a few lines up " | (V) -> select a few lines down " | (V) -> select a few lines right " | (V) -> select a few lines left " " (paste functions) " p | (N) -> view the paste buffers and register contents " p | (N) -> paste in the direction entered " y | (N) -> copies the character at the cursor " P | (V) -> save selection to the buffer and paste over " p | (V) -> preserve the buffer pasting over selected text " " (delete/cut functions) " d | (V) -> delete the currently selected text " x | (V) -> delete the currently selected text " x | (N) -> delete the char(s) under and the cursor " X | (V) -> delete the currently selected lines " X | (N) -> delete the char(s) before the cursor " D | (V) -> delete the currently selected lines " D | (N) -> delete chars under and after the cursor on the line " dw | (N) -> delete chars under and after the cursor in the word " dd | (N) -> delete lines under and after the one below " " Filetype Specific Mappings: " (breeze->html compat) " _ | (N) -> move to the next sibling tag " + | (N) -> move to the previous sibling tag " - | (N) -> move to the first sibling tag " = | (N) -> move to the last sibling tag " _ | (N) -> move to the first child tag " + | (N) -> move to the last child tag " | (N) -> move to the parent tag " " (extradite) " | (A) -> close the dialog " | (A) -> same as down " l | (A) -> same as j " | (A) -> same as Up " h | (A) -> same as k " " (gundo) " | (A) -> same as normal + justify on the left " | (A) -> same as the left mouse " | (A) -> same as the left mouse " | (A) -> same as down " l | (A) -> same as j " | (A) -> same as Up " h | (A) -> same as k " " (help) " q | (A) -> close the dialog " ?? | (A) -> close the dialog " ?> | (A) -> close the dialog " ?< | (A) -> close the dialog " " (markdown) " | (A) -> show heading TOC instead of the taglist " " (markdown toc) " | (A) -> left click + left justify the cursor " | (A) -> same as the left click " | (A) -> same as the left click " | (A) -> select heading to edit " | (A) -> select heading but remain in toc " | (A) -> up " | (A) -> down " h | (A) -> j " l | (A) -> k " " (vimdiff) " <> | (N) -> update differences " >< | (N) -> update differences " > | (N) -> replace diff in other pane with current pane " replace diff in current pane with other pane " " (vimfiler) " | (A) -> left click + left justify the cursor " | (A) -> same as the left click " | (A) -> same as the left click " | (A) -> edit selected file " | (A) -> map to l, which opens a directory " | (A) -> map to h, which goes up one directory " ' | (A) -> edit the selected file " n | (A) -> start editing a new file " "ALIASES: COMMAND SHORTCUTS {{{ cabbrev GitLog ':Extradite:wincmd x:wincmd j:resize 10' cabbrev gitlog ':Extradite:wincmd x:wincmd j:resize 10' cabbrev sudow SudoWrite cabbrev wsudo SudoWrite cabbrev sudoe SudoRead cabbrev esudo SudoRead "}}} "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "MOUSE:{ "hold shift to enable middle-click paste noremap noremap! "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 "hold ctrl while clicking to select the current line nnoremap V inoremap V "hold alt while clicking to select the current paragraph nnoremap vip xnoremap vip inoremap vip "} "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' "} "TOGGLES:{ "bindings to trigger vimfiler nnoremap `` ':VimFilerExplorer -direction=botright -winwidth=45' nnoremap ~~ ':VimFilerExplorer -direction=topleft -winwidth=45' nnoremap ?? ':h quickref' nnoremap ?> ':exusage' nnoremap ?< ':viusage' "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!' "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 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 syntax checking nnoremap ':SyntasticToggleMode' xnoremap ':SyntasticToggleModev' inoremap ':SyntasticToggleMode' "toggle signify and signify highlight let g:signify_mapping_toggle = '' nnoremap ':Extradite:wincmd x:wincmd j:resize 10' xnoremap ':Extradite:wincmd x:wincmd j:resize 10' inoremap ':Extradite:wincmd x:wincmd j:resize 10' "bindings to trigger the tagbar list of tags nnoremap ':TagbarToggle:echo "tagbar toggled"' xnoremap ':TagbarTogglev' inoremap ':TagbarToggle' "bindings to trigger the tagbar list of errors nmap