123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- execute pathogen#infect()
- colorscheme torte
- syntax enable
- set tabstop=4
- set softtabstop=4
- set shiftwidth=4
- set expandtab
- set number
- set showcmd
- set nocursorline
- filetype indent on
- set wildmenu
- set lazyredraw
- set showmatch
- set incsearch
- set foldmethod=indent
- set foldlevelstart=1
- map <space> <leader>
- set foldmethod=indent
- if !(has("win32") || has("win16") || has("win32unix"))
- if filereadable("/bin/zsh") && $SHELL=="/bin/zsh"
- silent! set shell=/bin/zsh
- endif
- endif
- function! UnixCapsControl()
- silent! let running = system('echo $(pgrep -c vim)')
- if(running <= 1)
- silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'
- endif
- endfunction
- if !(has("win32") && !has("win16") && !has("win32unix")) && (!$SSH_CLIENT && !$SSH_TTY) && executable("xmodmap")
- au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
- au VimLeave * :call UnixCapsControl()
- endif
- function! 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
- endif
- endfunction
- if (has("win32") || has("win16"))
- au VimEnter * silent! !start C:\Users\Josh\vimfiles\CapsEsc.exe
- au VimLeave * :call WindowsCapsControl()
- endif
- function! CygwinCapsControl()
- silent! let running = system('echo $(pgrep -c vim)')
- if(running <= 1)
- silent! !pkill CapsEsc
- endif
- endfunction
- if (has("win32unix"))
- au VimEnter * silent! !/home/josh/.vim/CapsEsc.exe &
- au VimLeave * :call CygwinCapsControl()
- endif
- set updatecount=10
- set backspace=indent,eol,start
- noremap <Leader>l Vgq
- set undofile
- set undodir=~/.vim/undodir
- autocmd FileType make setlocal noexpandtab
- function! s:DiffWithSaved()
- let filetype=&ft
- diffthis
- vnew | r # | normal! 1Gdd
- diffthis
- exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
- endfunction
- com! DiffSaved call s:DiffWithSaved()
- noremap <Leader>d :DiffSaved<CR>
- noremap <Leader>c :WriteMake<CR>
- cmap w!! %!sudo tee > /dev/null %
- noremap <Leader>m :MRU<CR>
- noremap <Leader>g :Geeknote<CR>
- noremap <Leader>u :UndotreeToggle<CR>
- 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 = 0
- endif
- let g:ycm_global_ycm_extra_conf = '/home/josh/.vim/bundle/ycm_extra_conf.py'
- let g:ycm_autoclose_preview_window_after_insertion=1
- highlight YcmWarningSection ctermfg=Yellow
- highlight YcmWarningSign ctermfg=Yellow
- highlight YcmErrorSection ctermfg=Red
- highlight YcmErrorsign ctermfg=Red
|