From: Jannik Zander Date: Sun, 5 Aug 2018 05:03:06 +0000 (+0200) Subject: Refresh UI X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=ec88c829d0f1faf0c0371664ed6b67dd914c42cc;p=vimfiles.git Refresh UI --- diff --git a/vimrc b/vimrc index eeda3c9..3154dda 100644 --- a/vimrc +++ b/vimrc @@ -194,6 +194,17 @@ function! s:Iar() endfunction command! -bang -nargs=0 -complete=file Iar call s:Iar() +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 @@ -227,15 +238,15 @@ if has('autocmd') 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