tags:

views:

490

answers:

1

the command to Refresh file from version on disk is :e!

How can I do the same on all files in the buffer

Background. I need that because I am using git with multiple branches with one vim open that contains a buffer. When I checkout to a branch, I would like to have vim to refresh.

+7  A: 

Read the documentation for bufdo, it should do what you want.

pmf
ok great so, :bufdo e! will do that. But there is a prompt Load (Y/N) each time. How can I get rid of it?
odwl
Use `set noconfirm` before using the `bufdo` command (`set confirm` afterwards to reanable).
pmf