-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
C-enhancementCategory: ImprovementsCategory: Improvements
Description
I have not seen this posted in any issue nor PR.
I am aware of the existence of wqa and wqa!, but having wbca and wbca! actually seems like a feature worthy of implementing, as sometimes changing work from a part of a repo to another could be done without exiting the editor, but still closing all of the open buffers.
Even if it is only for the sake of consistency since we already have bca, bca!, wbc and wbc!.
I develop mostly in C and R, but can try to implement this and open a PR with some guidance from a dev who knows the codebase, but looking at helix-term/src/commands/typed.rs I assume it would look something like
fn write_buffer_close_all(
cx: &mut compositor::Context,
args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
return Ok(());
}
write_impl(
cx,
args.first(),
WriteOptions {
force: false,
auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
},
)?;
let document_ids = buffer_gather_all_impl(cx.editor);
buffer_close_by_ids_impl(cx, &document_ids, false)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: ImprovementsCategory: Improvements