" Keyboard Configuration: " "===========================" " " Reference: (view plugin documentation for the full list of commands each offers) " , | (A) -> enter this following an emme 'word' (ie: html:5) " | (N) -> toggle hexhighlight's hexcode to colours in :gui " cs'" | (N) -> change surrounding '' to "" (any delimiters work) " cs" | (N) -> change surrounding "" to the tag: " cst" | (N) -> change any surrounding tag to "" " ds" | (N) -> delete surrounding "" " " Mappings: " = | (N) -> move to the first character on the next line " | (A) -> scroll right " | (A) -> scroll left " | (A) -> unbind this from vim so xorg can paste " | (A) -> open a new tab " | (A) -> go to the next open tab " | (A) -> go to the previous open tab " | (V) -> indent all the lines currently selected " | (N) -> indent the current line " | (V) -> unindent all the lines currently selected " | (N) -> unindent the current line " \\ | (N) -> show spelling suggestions popup for selection " ` | (N) -> toggle the nerdtree sidebar " ~ | (N) -> toggle the tagbar sidebar " p | (V) -> paste and replace the selection " | (N) -> paste and replace the current word " | (A) -> toggle line numbers " | (A) -> toggle line wrapping " | (A) -> toggle row/column highlighting " | (A) -> toggle spellcheck " | (A) -> toggle collapsed/folded rows " | (N) -> format document and return to current line " | (N) -> remove whitespace " | (N) -> move to the beginning of the document " | (N) -> move to the beginning of the document " | (N) -> move to the end of the document " | (N) -> move to the end of the document " | (N) -> move to the end of the line " | (N) -> move to the end of the line " | (N) -> move to the beginning of the non-whitespace " | (N) -> move to the beginning of the line " | (N) -> select all " | (N) -> select all text above the cursor " | (N) -> select all text above the cursor " | (N) -> select all text below the cursor " | (N) -> select all text below the cursor " | (N) -> select all text to the right of the cursor " | (N) -> select all text to the right of the cursor " | (N) -> select to the beginning of the non-whitespace " | (N) -> select to the beginning of the line " " (neocomplcache) " | (I) -> write the part common to all suggestions " | (I) -> cancle the match dialog (during suggestion) " | (N) -> undo the most recent match selection " " GVim Mappings: " | (A) -> toggle the menu " | (A) -> toggle the toolbar " | (A) -> toggle the scrollbar " " Aliases: " :wsudo & :sudow | (N) -> :SudoWrite (write the file as root using sudo) " :esudo & :sudoe | (N) -> :SudoRead (read a file as root using sudo) " " Notes: " *by the default key is: \ " "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "map = to + so shift doesn't need to be held to use its functionality nnoremap = + "hold shift to enable middle-click paste noremap noremap! "hold ctrl to scroll left/right instead of up/down noremap 3zl noremap 3zh "tab and untabbing selected blocks vnoremap >gv vnoremap v>gv nnoremap v "press backslash twice on a mispelled word for suggestions nnoremap \\ ea "move to the next and previous tabs nnoremap ':tabnew' nnoremap ':tabnext' nnoremap ':tabprev' "map shift-p to paste over a word, and visual paste to replace selection vnoremap p "_d"0P nnoremap "_diwP "unmap F1 from help then map it to toggle the display of line numbers nnoremap ':set number!' inoremap ':set number!a' vnoremap ':set number!v' "toggle line wrapping (and bottom bar if using the gui) nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" inoremap ':set wrap! go'.'-+'[&wrap]."=b\ra" vnoremap ':set wrap! go'.'-+'[&wrap]."=b\rv" "toggle the cursor line and column nnoremap ':set cursorline! cursorcolumn!' inoremap ':set cursorline! cursorcolumn!a' vnoremap ':set cursorline! cursorcolumn!v' "toggle spellcheck nnoremap ':set spell!' inoremap ':set spell!a' vnoremap ':set spell!a' "toggle folded code at foldpoints inoremap za nnoremap za onoremap za vnoremap zav "format the document nnoremap mzgg=G`z "remove trailing white space from the document nnoremap ':FixWhitespace' "remap keys to scroll through text nnoremap gg0 nnoremap gg0 nnoremap G$ nnoremap G$ nnoremap $ nnoremap $ nnoremap ^ nnoremap ^ "map remap keys to select text nnoremap gg0vG$ nnoremap vgg0 nnoremap vgg0 nnoremap vG$ nnoremap vG$ nnoremap v$ nnoremap v$ nnoremap v^ nnoremap v^ "}}} "PLUGIN KEYBINDINGS {{{ "toggle the nerd tree sidebar nnoremap ` ':NERDTree' "toggle the tagbar sidebar nnoremap ~ ':TagbarToggle' "neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down inoremap pumvisible() ? neocomplcache#complete_common_string() : "\" inoremap pumvisible() ? neocomplcache#close_popup() : "\" inoremap neocomplcache#undo_completion() "emmet switch triggerkey from to let g:user_emmet_leader_key='' "}}} "TMUX AND SCREEN COMPATIBILITY: SOME HACKS TO MAKE THINGS WORK RIGHT {{{ if $TERM =~ '^screen-256color' nmap OH imap OH nmap OF imap OF endif "tmux will send xterm-style keys when xterm-keys is on if &term =~ '^screen' && exists('$TMUX') execute "set =\e[1;*A" execute "set =\e[1;*B" execute "set =\e[1;*C" execute "set =\e[1;*D" execute "set =\e[1;*H" execute "set =\e[1;*F" execute "set =\e[2;*~" execute "set =\e[3;*~" execute "set =\e[5;*~" execute "set =\e[6;*~" execute "set =\e[1;*P" execute "set =\e[1;*Q" execute "set =\e[1;*R" execute "set =\e[1;*S" execute "set =\e[15;*~" execute "set =\e[17;*~" execute "set =\e[18;*~" execute "set =\e[19;*~" execute "set =\e[20;*~" execute "set =\e[21;*~" execute "set =\e[23;*~" execute "set =\e[24;*~" endif "}}} "GVIM: MAPPINGS FOR GUI ELEMENTS {{{ "map toggles for the menu, toolbar and vertical scrollbar noremap ":if &go=~#'m'set go-=melseset go+=mendif" noremap ":if &go=~#'T'set go-=Telseset go+=Tendif" noremap ":if &go=~#'r'set go-=relseset go+=rendif" "}}} "ALIASES: COMMAND SHORTCUTS {{{ cabbrev sudow SudoWrite cabbrev wsudo SudoWrite cabbrev sudoe SudoRead cabbrev esudo SudoRead "}}}