diff --git a/vimrc b/vimrc index 333e67e..e7accf7 100644 --- a/vimrc +++ b/vimrc @@ -87,6 +87,11 @@ set list listchars=tab:»·,trail:· " Adding this since the esc remap on the 'i' key had a long delay when pressed set timeoutlen=300 ttimeoutlen=0 +" Allow undo when doing back into a closed file +set undodir=$HOME/.vim/undo +set undolevels=1000 +set undoreload=10000 + " When loading text files, wrap them and don't split up words. au BufNewFile,BufRead *.txt setlocal wrap au BufNewFile,BufRead *.txt setlocal lbr @@ -99,12 +104,21 @@ if &term =~ '256color' set t_ut= endif +" Disable arrow keys +map +map +map +map +imap +imap +imap +imap + " Notes and other helpers map bb :!bundle install map gs :Gstatus map gw :!git add . && git commit -m 'WIP' && git push map nn :sp ~/Dropbox/notes/programming-notes -map p :set pasteo"*]p:set nopaste map pn :sp ~/Dropbox/notes/project-notes " Remove trailing whitespace on save all files. @@ -142,8 +156,8 @@ imap end imap => " Mapping ESC in insert mode and command mode to double i -" imap ii -"" cmap ii +imap kj +cmap kj " suspend process nmap z @@ -334,3 +348,6 @@ function! RunTests(filename) end endfunction +" Use Marked.app to preview Markdown files... +nnoremap p :silent !open -a Marked.app '%:p' +