I’d like to save the files opened in all vertical/horizontal windows? Is it possible without going to each window and executing the :w!
command?
Asked
Active
Viewed 3,164 times
10
-
To save all and exit, try: `:xa`. – kenorb Apr 18 '15 at 20:53
-
possible duplicate of [How to save all files in tabs on Vim?](http://stackoverflow.com/questions/4246268/how-to-save-all-files-in-tabs-on-vim) – kenorb Apr 18 '15 at 20:54
3 Answers
11
To save only those buffers that opened in the current tab page and not
those that are hidden, run the :write
command for every open window:
:windo w!
In order to save all open buffers regardless of the corresponding
windows’ locations, run the :wall
command:
:wa!
There is also a similar command
:bufdo w!
but it does not behave in quite the same fashion. Both commands affect
hidden buffers, but :wall
does not attempt to write the buffers
that do not have a file name set.

ib.
- 27,830
- 11
- 80
- 100
4
Use :wall
It writes all changed buffers (but it will also save the hidden one).

Xavier T.
- 40,509
- 10
- 68
- 97