From 78d37fd332ab98e867b8e74f08c4cf45295c167a Mon Sep 17 00:00:00 2001 From: Daniel S Poulin Date: Mon, 28 Feb 2022 20:31:24 -0500 Subject: Implement bulk buffer closing commands (#1677) * Implement buffer-close-all * Implement buffer-close-others * Refactor all buffer close variants to use shared logic * Fix clippy lint * Docgen for new commands * Shorten error message for attempting to close buffers that don't exist * Refactor shared buffer methods to pass only editor, not whole compositor * Switch signature of bulk buffer closing to use slice of DocumentIds Addresses feedback that accepting an IntoIterator implementor is too much for an internal. Also possibly saves some moving?--- book/src/generated/typable-cmd.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'book/src') diff --git a/book/src/generated/typable-cmd.md b/book/src/generated/typable-cmd.md index 5881716d..370da21a 100644 --- a/book/src/generated/typable-cmd.md +++ b/book/src/generated/typable-cmd.md @@ -5,6 +5,10 @@ | `:open`, `:o` | Open a file from disk into the current view. | | `:buffer-close`, `:bc`, `:bclose` | Close the current buffer. | | `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully (ignoring unsaved changes). | +| `:buffer-close-others`, `:bco`, `:bcloseother` | Close all buffers but the currently focused one. | +| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Close all buffers but the currently focused one. | +| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers, without quiting. | +| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Close all buffers forcefully (ignoring unsaved changes), without quiting. | | `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) | | `:new`, `:n` | Create a new scratch buffer. | | `:format`, `:fmt` | Format the file using the LSP formatter. | -- cgit v1.2.3-70-g09d2