]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
Simplify autocommand by making it buffer-local
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 194e4184358050ba8388eac210a2ef81a8e56365..bf75518fcad5ae091449954f5664fed6b728080b 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -725,6 +725,14 @@ command! UName call Uname()
 endif
 " ----------
 
+augroup redraw-once
+autocmd!
+" Redraw screen after all macros in ~/.vimrc and ~/.vim/
+autocmd BufReadPost * redraw
+" Remove the redraw autocommand (it's only needed once) and the autgroup
+autocmd BufReadPost * autocmd! redraw-once
+autocmd BufReadPost * augroup! redraw-once
+augroup END
 
 " This has to go to the very end of ~/.vimrc to allow reading the .vimrc
 set secure        " safer working with script files in the current directory