@@ -739,6 +739,18 @@ fn write_all(
739739 write_all_impl(cx, false, true)
740740}
741741
742+fn force_write_all(
743+ cx: &mut compositor::Context,
744+ _args: &[Cow<str>],
745+ event: PromptEvent,
746+) -> anyhow::Result<()> {
747+ if event != PromptEvent::Validate {
748+ return Ok(());
749+ }
750+
751+ write_all_impl(cx, true, true)
752+}
753+
742754fn write_all_quit(
743755 cx: &mut compositor::Context,
744756 _args: &[Cow<str>],
@@ -2444,6 +2456,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
24442456 fun: write_all,
24452457 signature: CommandSignature::none(),
24462458 },
2459+ TypableCommand {
2460+ name: "write-all!",
2461+ aliases: &["wa!"],
2462+ doc: "Forcefully write changes from all buffers to disk creating necessary subdirectories.",
2463+ fun: force_write_all,
2464+ signature: CommandSignature::none(),
2465+ },
24472466 TypableCommand {
24482467 name: "write-quit-all",
24492468 aliases: &["wqa", "xa"],