| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 | " start pluginsexecute pathogen#infect()" set black color schemecolorscheme torte" enable syntax processingsyntax enable" number of visual spaces per TABset tabstop=4" number of spaces in tab when editingset softtabstop=4" number of space when using > or <set shiftwidth=4	" tabs are spacesset expandtab		" show line numbersset number		" show command in bottom barset showcmd		" highlight current lineset cursorline		" load filetype-specific indent filesfiletype indent on	" visual autocomplete for command menuset wildmenu		" redraw only when necessary (faster macros)set lazyredraw		" highlight matching bracketsset showmatch		" search as characters are enteredset incsearch   " fold based on indentset foldmethod=indent   " foldlevel when window is loadedset foldlevelstart=1   " space is Leadermap <space> <leader>" fold based on indent levelset foldmethod=indent	" set shell to zsh (if it exists)if !(has("win32") || has("win16") || has("win32unix"))    if filereadable("/bin/zsh")        silent! set shell=/bin/zsh      endifendif" function to check for running instances of vim on Linuxfunction! UnixCapsControl()    silent! let running = system('echo $(pgrep -c vim)')    if(running <= 1)        silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'    endifendfunction" map caps lock to escape under Linuxif !(has("win32") || has("win16") || has("win32unix"))    au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'    au VimLeave * :call UnixCapsControl() endif" function to check for running instances of vim on Windowsfunction! WindowsCapsControl()    silent! let running = system('tasklist /FI "IMAGENAME eq vim.exe" 2>NUL | find /I /C "vim.exe"')    if(running <= 1)        silent! !start taskkill /IM CapsEsc.exe    endifendfunction" map caps lock to escape under Windowsif (has("win32") || has("win16"))    au VimEnter * silent! !start C:\Users\Josh\vimfiles\CapsEsc.exe    au VimLeave * :call WindowsCapsControl()endif"" function to check for running instances of vim on Cygwinfunction! CygwinCapsControl()    silent! let running = system('echo $(pgrep -c vim)')    if(running <= 1)        silent! !pkill CapsEsc    endifendfunction" map caps lock to excape under Cygwinif (has("win32unix"))    au VimEnter * silent! !/home/josh/.vim/CapsEsc.exe &    au VimLeave * :call CygwinCapsControl()endif" swap files are rotated every 10 keystrokesset updatecount=10  " backspace is used to remove previous characters, indents, and newlinesset backspace=indent,eol,start	" <Leader>l formats a linenoremap <Leader>l Vgq   " make an undo file to allow undoing after closing a fileset undofileset undodir=~/.vim/undodir" set Makefiles with tabs not spacesautocmd FileType make setlocal noexpandtab" compare current buffer to saved filefunction! s:DiffWithSaved()  let filetype=&ft  diffthis  vnew | r # | normal! 1Gdd  diffthis  exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetypeendfunctioncom! DiffSaved call s:DiffWithSaved()" map the comp buff function abovenoremap <Leader>d :DiffSaved<CR>" function to write a file and immediately run makefunction! s:writeAndMake()    :w    :makeendfunctioncom! WriteMake call s:writeAndMake()" map the write and make functionnoremap <Leader>c :WriteMake<CR>" write w/ privileges when Vim isn't started as rootcmap w!! %!sudo tee > /dev/null %" plugins" show recently opened filesnoremap <Leader>m :MRU<CR>  " Start Geeknotenoremap <Leader>g :Geeknote<CR>  " show undo treenoremap <Leader>u :UndotreeToggle<CR>  " syntastic if exists(':SyntasticStatuslineFlag()')    set statusline+=%#warningmsg#    set statusline+=%{SyntasticStatuslineFlag()}    set statusline+=%*    let g:syntastic_always_populate_loc_list = 1    let g:syntastic_auto_loc_list = 1    let g:syntastic_check_on_open = 1    let g:syntastic_check_on_wq = 0endif" YouCompleteMelet g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py'    " autoclose suggestion windowslet g:ycm_autoclose_preview_window_after_insertion=1" colorshighlight YcmWarningSection ctermfg=Yellowhighlight YcmWarningSign ctermfg=Yellowhighlight YcmErrorSection ctermfg=Redhighlight YcmErrorsign ctermfg=Red
 |