vim-auto-save
vim-auto-save copied to clipboard
Use `:wall` instead of `:bufdo update`
@907th I know that you don't maintain this plug-in anymore, but do you still remember, by any chance, if there's an important reason to use :bufdo update instead of simply :wall?
:wall
- Writes all files that have been changed.
- Includes hidden buffers, non-listed buffers, and even those not currently visible in a window, as long as they are loaded and modified.
- Can trigger error messages or prompts for things like:
- Read-only files.
- Buffers with unsaved changes that can't be written due to permissions.
- Might be too aggressive in an auto-save context.
:bufdo update
- Runs
:updateon each listed buffer (those shown in :ls) one by one. :updateonly writes the file if it has been modified.- Skips unmodified buffers silently (avoids unnecessary writes).
- Respects hidden and buftype options more gently.
- Less likely to interfere with buffers that are:
- Open from netrw or plugins.
- Read-only or non-file buffers.