2018-03-17 23:59:01 +00:00
|
|
|
" persistent folds
|
|
|
|
augroup AutoSaveFolds
|
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost *.* mkview
|
|
|
|
autocmd BufWinEnter *.* silent loadview
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
" fix higlight problems such as vertical-align etc
|
|
|
|
augroup VimCSS3Syntax
|
|
|
|
autocmd!
|
|
|
|
autocmd FileType css setlocal iskeyword+=-
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
" Show trailing whitepace and spaces before a tab:
|
|
|
|
augroup whitespaceerrors
|
2018-03-21 22:52:31 +00:00
|
|
|
autocmd!
|
2018-03-17 23:59:01 +00:00
|
|
|
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
" automatically reload if color scheme file written
|
|
|
|
augroup coloreload
|
2018-03-21 22:52:31 +00:00
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost customred256.vim so $MYVIMRC
|
2018-03-17 23:59:01 +00:00
|
|
|
augroup end
|
|
|
|
|
|
|
|
augroup linenumbering
|
2018-03-21 22:52:31 +00:00
|
|
|
autocmd!
|
2018-03-17 23:59:01 +00:00
|
|
|
autocmd InsertEnter * :set norelativenumber
|
|
|
|
autocmd InsertLeave * :set number relativenumber
|
|
|
|
autocmd WinEnter * :set number relativenumber
|
|
|
|
autocmd WinLeave * set norelativenumber
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
augroup colorcolumns
|
2018-03-21 22:52:31 +00:00
|
|
|
autocmd!
|
2018-03-18 16:25:44 +00:00
|
|
|
autocmd WinEnter * call SetColorColumn()
|
|
|
|
autocmd WinLeave * setlocal colorcolumn=0
|
2018-03-17 23:59:01 +00:00
|
|
|
augroup END
|
|
|
|
|
|
|
|
" Automatically reload .vimrc if chanaged
|
|
|
|
augroup myvimrc
|
2018-03-21 22:52:31 +00:00
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
2018-03-17 23:59:01 +00:00
|
|
|
augroup END
|
|
|
|
|
2018-03-28 18:28:48 +00:00
|
|
|
" Open qfix after grepping
|
|
|
|
augroup qfixopen
|
|
|
|
autocmd!
|
|
|
|
autocmd QuickFixCmdPost *grep* botright cwindow
|
|
|
|
augroup END
|
|
|
|
|
2018-03-17 23:59:01 +00:00
|
|
|
" vim: foldmethod=marker
|