" A .vimrc-like file. At present, very little is supported. " You can use the commands: " inoremap " vnoremap " nnoremap " imap " nmap " vmap " unmap " Because commands are passed directly to CodeMirror's ViM API, " insert-mode mappings seem to be unable to insert text. " HOTKEYS ------------------------------------------------------------------------------------------ " add lines with double o nnoremap oo o nnoremap OO O " H and L for end and beginning nmap H ^ nmap L $ vmap H ^ vmap L $ " useful functions for arrow keys " (and force the user to use `hjkl`) " right/left to add/remove a tab in the beginning of the line. nmap << nmap >> " same for visual mode (plus reselecting stuff for visual mode) vmap >gv " up and down move lines up and down nmap :m -2 nmap :m +1 " same for visual mode (plus reselecting stuff for visual mode) vmap :m -2 vmap :m +1 " resize windows nnoremap :vertical resize -1 nnoremap :vertical resize +1 nnoremap :resize -1 nnoremap :resize +1 nnoremap map h :noh " copy to system clipboard when space is used. (note, install gvim for this) vnoremap y "+y nnoremap Y "+Y nnoremap y "+y nnoremap yy "+yy " don't write the pasted upon stuff in visual mode into the register vnoremap p pgvy map " :vsplit map % :split nnoremap j :join nnoremap J :move .-2 :join nnoremap s i nnoremap S i V:m -2 nmap kzz nmap jzz nmap # ` vmap # `