""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Important: " This requries that you install https://github.com/amix/vimrc ! " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => GUI related """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set background=dark colorscheme peaksea " Set font according to system if has("mac") || has("macunix") set gfn=Menlo:h15 elseif has("win16") || has("win32") set gfn=Bitstream\ Vera\ Sans\ Mono:h11 elseif has("linux") set gfn=Monospace\ 11 endif " Open MacVim in fullscreen mode if has("gui_macvim") set fuoptions=maxvert,maxhorz au GUIEnter * set fullscreen endif " Disable scrollbars (real hackers don't use scrollbars for navigation!) set guioptions-=r set guioptions-=R set guioptions-=l set guioptions-=L """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Fast editing and reloading of vimrc configs """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" map e :e! ~/.vim_runtime/my_configs.vim autocmd! bufwritepost vimrc source ~/.vim_runtime/my_configs.vim """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Turn persistent undo on " means that you can undo even when you close a buffer/VIM """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" try set undodir=~/.vim_runtime/temp_dirs/undodir set undofile catch endtry """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Parenthesis/bracket """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" vnoremap $1 `>a)` vnoremap $2 `>a]` vnoremap $3 `>a}` vnoremap $$ `>a"` vnoremap $q `>a'` vnoremap $e `>a"` " Map auto complete of (, ", ', [ inoremap $1 ()i inoremap $2 []i inoremap $3 {}i inoremap $4 {o}O inoremap $q ''i inoremap $e ""i inoremap $t <>i """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => General abbreviations """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" iab xdate =strftime("%d/%m/%y %H:%M:%S") """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Omni complete functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd FileType css set omnifunc=csscomplete#CompleteCSS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" func! CurrentFileDir(cmd) return a:cmd . " " . expand("%:p:h") . "/" endfunc