"===========================" " 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: " | (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 a block in visual mode " | (V) -> unindent a block in visual mode " \\ | (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 | (N) -> :SudoWrite (write the file as root using sudo) " :esudo | (N) -> :SudoRead (read a file as root using sudo) " " Notes: " *by the default key is: \ " "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "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 "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) if !has("gui_running") nnoremap ':set wrap!' inoremap ':set wrap!' vnoremap ':set wrap!' else nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" inoremap ':set wrap! go'.'-+'[&wrap]."=b\ra" vnoremap ':set wrap! go'.'-+'[&wrap]."=b\rv" endif "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 gg nnoremap gg0 nnoremap G nnoremap G$ nnoremap $ nnoremap $ nnoremap ^ nnoremap 0 "map remap keys to select text nnoremap ggvG nnoremap vgg nnoremap vgg0 nnoremap vG nnoremap vG$ nnoremap v$ nnoremap v$ nnoremap v^ nnoremap v0 "}}} "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 "}}} "GVIM: MAPPINGS FOR GUI ELEMENTS {{{ "map toggles for the menu, toolbar and 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 wsudo SudoWrite cabbrev esudo SudoRead "}}}