Skip to content

feat(commands): add save-all command - #317

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/write-all
Aug 22, 2026
Merged

fcoury-oai merged 1 commit into
mainfrom
fcoury/write-all

Conversation

@fcoury-oai

@fcoury-oai fcoury-oai commented Aug 22, 2026 •

Copy link
Copy Markdown
Collaborator

Red can write only the current buffer with :w, which makes multi-buffer editing rely on :bufdo write. That workaround changes the active buffer and also visits clean buffers.

This adds the Vim-compatible :wa[ll] command and a Save all files command-palette action. It snapshots modified buffers, writes every named target through the existing save pipeline, skips clean buffers, and restores the original active buffer and view. Dirty unnamed buffers stay open and report an error after the named buffers have been saved.

The command parser, discovery metadata, Vim compatibility docs, and integration coverage are updated together so :wa, :wal, and :wall remain collision-safe alongside :w.

How to Test

  1. Open two named files, modify both, keep the first active, and run :wa. Both files should be updated on disk, and the first buffer should remain active.
  2. Modify an unnamed buffer and one or more named buffers, then run :wall. The named files should be saved, while the unnamed buffer remains dirty and reports No file name for buffer N.
  3. Run cargo test --test editing wall_; all three focused save-all integration tests should pass.

@fcoury-oai
fcoury-oai merged commit 12fee08 into main Aug 22, 2026
10 checks passed
@fcoury-oai
fcoury-oai deleted the fcoury/write-all branch August 22, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant