endfunction
command! -bang -nargs=0 -complete=file Iar call s:Iar(<f-args>)
+function! RefreshUI()
+ if exists(':AirlineRefresh')
+ AirlineRefresh
+ else
+ " Clear & redraw the screen, then redraw all statuslines.
+ redraw!
+ redrawstatus!
+ endif
+endfunction
+
+
" Autocommands
if has('autocmd')
augroup expandtabs
augroup vimrc
autocmd!
- autocmd bufwritepost ~/.vim/gvimrc silent source %
- autocmd bufwritepost ~/.vim/vimrc silent source %
- autocmd bufwritepost ~/.vim/vimrc.local silent source %
+ autocmd BufWritePost ~/.vim/vimrc source $MYVIMRC | :call RefreshUI()
+ autocmd BufWritePost ~/.vim/gvimrc source $MYVIMRC | :call RefreshUI()
+ autocmd BufWritePost ~/.vim/vimrc.local source $MYVIMRC | :call RefreshUI()
augroup end
augroup quickfix
-" autocmd QuickFixCmdPost [^l]* nested cwindow
-" autocmd QuickFixCmdPost l* nested lwindow
- autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1)
+" autocmd QuickFixCmdPost [^l]* nested cwindow
+" autocmd QuickFixCmdPost l* nested lwindow
+ autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1)
augroup end
endif