-1

I use Vim-Airline plug in Vim, but statuline incomplete display after source .vimrc, so I want use :redraw! in augroup but it not take effect.

augroup Vim
autocmd!
autocmd BufWritePost $MYVIMRC ++nested source $MYVIMRC ":redraw!"
augroup End

I can only exec :redraw! in command line. How to improve my code?

Clark Kent
  • 31
  • 6

1 Answers1

1

I am not sure where those quotes around :redraw! come from or what you expect them to do since " introduces a comment.

In Vim, you use a "bar", |, to separate Ex commands like :source and :redraw:

augroup Vim
    autocmd!
    autocmd BufWritePost $MYVIMRC ++nested source $MYVIMRC | redraw!
augroup END

See :help :bar.

romainl
  • 186,200
  • 21
  • 280
  • 313