diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index ee774e5..e6437c3 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -13,247 +13,254 @@ " *The default key is: \ " " Aliases: -" :GitLog & :gitlog | (C) -> show a navigatable log of commit history -" :GitDiff & :gitdiff | (C) -> current file and last commit in vimdiff -" :GitStatus & :gitstatus | (C) -> shows the output of git status -" :GitCommit & :gitcommit | (C) -> commits changes to the current file -" :wsudo & :sudow | (C) -> write the file as root using sudo -" :esudo & :sudoe | (C) -> read a file as root using sudo +" :GitLog & :gitlog | (C) -> show a navigatable log of commit history +" :GitDiff & :gitdiff | (C) -> current file and last commit in vimdiff +" :GitStatus & :gitstatus | (C) -> shows the output of git status +" :GitCommit & :gitcommit | (C) -> commits changes to the current file +" :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 -" gc | (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 -" + | (V) -> increase the selected region -" _ | (V) -> decrease the selected region -" | (N) -> center content and hide everything else +" | (A) -> comment selection/create an empty comment +" gc | (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 +" + | (V) -> increase the selected region +" _ | (V) -> decrease the selected region +" | (N) -> center content and hide everything else " " (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 "" +" 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 "" " " Mappings: " (mouse) -" | (A) -> unbind this from vim so xorg can paste +" | (A) -> unbind this from vim so xorg can paste " -" | (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) -> 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) -> behaves like right-click (selects to the cursor) +" | (A) -> behaves like right-click (selects to the cursor) " -" | (A) -> copy selection or character under the cursor -" | (A) -> copy selection or character under the cursor -" | (A) -> cut selection or character under the cursor -" | (A) -> cut selection or character under the cursor -" | (A) -> paste at the cursor (not mouse) -" | (A) -> paste at the cursor (not mouse) +" | (A) -> copy selection or character under the cursor +" | (A) -> copy selection or character under the cursor +" | (A) -> cut selection or character under the cursor +" | (A) -> cut selection or character under the cursor +" | (A) -> paste at the cursor (not mouse) +" | (A) -> paste at the cursor (not mouse) " -" | (A) -> select the word being clicked -" | (A) -> select the line being clicked -" | (A) -> select the paragraph being clicked +" | (A) -> select the word being clicked +" | (A) -> select the line being clicked +" | (A) -> select the paragraph being clicked " " (tabs) -" | (N) -> go to the next open tab -" | (N) -> go to the previous open tab -" | (N) -> open a new tab -" | (N) -> create a new tab with vimfiler -" | (N) -> create a new tab with a double pane vimfiler +" | (N) -> go to the next open tab +" | (N) -> go to the previous open tab +" | (N) -> open a new tab +" | (N) -> create a new tab with vimfiler +" | (N) -> create a new tab with a double pane 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 +" ?? | (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 +" | (A) -> toggle the menu +" | (A) -> toggle the toolbar +" | (A) -> toggle the scrollbar " " (completion) -" , | (A) -> enter after emmet '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 +" , | (A) -> enter after emmet '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) -> format document using :Autoformat -" | (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 +" | (V) -> deletes currently selected text +" | (N) -> format document and return to cursor +" | (V) -> format the selection and return to cursor +" | (N) -> format document using :Autoformat +" | (N) -> format document to a width of 79 characters +" | (V) -> format selection to a width of 79 characters +" | (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 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 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 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 +" | (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) +" >> | (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 +" | (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 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 +" | (V) -> select a few lines up +" | (V) -> select a few lines down +" | (V) -> select a few lines right +" | (V) -> select a few lines left " " (copy/paste and undo/redo) -" p | (N) -> view the paste buffers and register contents -" 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 -" Direction | (N) -> paste in the direction entered +" p | (N) -> view the paste buffers and register contents +" 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 +" Direction | (N) -> paste in the direction entered " " (delete/cut functions) -" x | (N) -> delete the char(s) under and the cursor -" x | (V) -> delete the currently selected text -" X | (N) -> delete the char(s) before the cursor -" X | (V) -> delete the currently selected lines -" D | (N) -> delete chars under and after the cursor on the line -" D | (V) -> delete the currently selected lines -" dw | (N) -> delete chars under and after the cursor in the word -" dd | (N) -> delete lines under and after the one below -" d | (V) -> delete the currently selected text +" x | (N) -> delete the char(s) under and the cursor +" x | (V) -> delete the currently selected text +" X | (N) -> delete the char(s) before the cursor +" X | (V) -> delete the currently selected lines +" D | (N) -> delete chars under and after the cursor on the line +" D | (V) -> delete the currently selected lines +" dw | (N) -> delete chars under and after the cursor in the word +" dd | (N) -> delete lines under and after the one below +" d | (V) -> delete the currently selected text " " (typical copy and paste shortcuts) -" | (N) -> paste from buffer -" | (V) -> paste buffer in place of selection -" | (I) -> paste from buffer then return to input -" | (N) -> copy character -" | (V) -> copy selection -" | (N) -> cut character -" | (V) -> cut selection +" | (N) -> paste from buffer +" | (V) -> paste buffer in place of selection +" | (I) -> paste from buffer then return to input +" | (N) -> copy character +" | (V) -> copy selection +" | (N) -> cut character +" | (V) -> cut selection " " (remap dangerous functions that skip undo) -" | (I) -> undo-able equivalent -" | (I) -> undo-able equivalent +" | (I) -> undo-able equivalent +" | (I) -> undo-able equivalent " " 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 +" _ | (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 +" | (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 +" | (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 +" 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 +" | (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 +" | (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 +" <> | (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 +" | (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 " +"DISABLED DEFAULT MAPPING: UNSET SHORTCUTS {{{ + noremap > + noremap < +"}}} + "ALIASES: COMMAND SHORTCUTS {{{ cabbrev GitLog ':Extradite:wincmd x:wincmd j:resize 10' cabbrev gitlog ':Extradite:wincmd x:wincmd j:resize 10' @@ -335,7 +342,7 @@ nnoremap ':tabnext' nnoremap ':tabprev' nnoremap ':tabnew' - nnoremap ':VimFiler -tab -project' + nnoremap ':VimFiler -tab -project' nnoremap ':VimFiler -tab -project -double' "} @@ -444,9 +451,11 @@ vnoremap "_x "formatting options to apply to the whole document - noremap :Autoformat:echo "The selection has been formatted with :Autoformat" nnoremap mzgg=G`z:echo "The document has been formatted" vnoremap mz=`z:echo "The selection has been formatted" + nnoremap :Autoformat:echo "The document has been formatted with :Autoformat" + nnoremap ':set tw=79gggqG:set tw=0:echo "Document text has been formatted to a width of 79 characters"' + vnoremap ':set tw=79gvgq:set tw=0:echo "Selected text has been formatted to a width of 79 characters"' nnoremap ':FixWhitespace:echo "Trailing whitespace has been removed"' nnoremap ':retab:noh:echo "Tabs have been converted to spaces"' nnoremap / ':noh:echo "Search results have been cleared"'