"============================================================" " " " 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: \ " " 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) " | (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) " 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 difference line highlight " | (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 " | (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 " " >> | (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: " (vimdiff) " <> | (N) -> update differences " >< | (N) -> update differences " > | (N) -> replace diff in other pane with current pane " replace diff in current pane with other pane " " (help) " q | (N) -> close the dialog " " (markdown) " | (A) -> show heading TOC instead of the taglist " " (markdown toc) " | (A) -> select heading but remain in toc " | (A) -> select heading to edit " | (A) -> up " | (A) -> down " h | (A) -> j " l | (A) -> k " " (vimfiler) " | (N) -> edit selected file " | (N) -> map to l, which opens a directory " | (N) -> map to h, which goes up one directory " ' | (N) -> edit the selected file " n | (N) -> start editing a new file " " (markdown toc + vimfiler) " | (N) -> left click + left justify the cursor " | (N) -> same as the left click " | (N) -> same as the left click " " (gundo) " | (N) -> same as normal + justify on the left " | (N) -> same as the left mouse " | (N) -> same as the left mouse " | (N) -> same as down " l | (N) -> same as j " | (N) -> same as Up " h | (N) -> same as k " " (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 " " Aliases: " :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo) " :esudo -and- :sudoe | (C) -> :SudoRead (read a file as root using sudo) " "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 "} "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 ':SignifyToggleHighlight:echo "toggled version control differences line highlight"' xnoremap ':SignifyToggleHighlightv' inoremap ':SignifyToggleHighlight' "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