44 lines
1.1 KiB
VimL
44 lines
1.1 KiB
VimL
" 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
|
|
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
|
|
augroup END
|
|
|
|
" automatically reload if color scheme file written
|
|
augroup coloreload
|
|
au!
|
|
au BufWritePost customred256.vim so $MYVIMRC
|
|
augroup end
|
|
|
|
augroup linenumbering
|
|
autocmd InsertEnter * :set norelativenumber
|
|
autocmd InsertLeave * :set number relativenumber
|
|
autocmd WinEnter * :set number relativenumber
|
|
autocmd WinLeave * set norelativenumber
|
|
augroup END
|
|
|
|
augroup colorcolumns
|
|
autocmd WinEnter * call SetColorColumn()
|
|
autocmd WinLeave * setlocal colorcolumn=0
|
|
augroup END
|
|
|
|
" Automatically reload .vimrc if chanaged
|
|
augroup myvimrc
|
|
au!
|
|
au BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
augroup END
|
|
|
|
" vim: foldmethod=marker
|