set nocompatible source ~/.vim/ui.vim source ~/.vim/autocommands.vim source ~/.vim/bundles.vim " For when you forget to sudo.. Really Write the file. cmap w!! w !sudo tee % >/dev/null " This helps with RVM etc set shell=zsh " CTags map rt :!ctags --extra=+f -R * set tags=tmp/tags;/,./tmp/tags;/,tags;/,./tags;/ " Theme development help cmap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" " Align cucumber tables function! s:align() let p = '^\s*|\s.*\s|\s*$' if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) Tabularize/|/l1 normal! 0 call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) endif endfunction inoremap :call align()a " Quick editing of common dot-files map vv :edit $MYVIMRC map gg :edit $MYGVIMRC map .. :cd ~/.config:enew if filereadable(expand('~/.vimrc.local')) source ~/.vimrc.local endif