feat: add :x alias for :wq in helix mode

This commit is contained in:
Igor Támara 2025-09-25 08:32:23 -05:00 committed by CJ van den Berg
parent 7c49138eac
commit 9db6bf56c1

View file

@ -50,6 +50,11 @@ const cmds_ = struct {
} }
pub const wq_meta: Meta = .{ .description = "wq (write/save file and quit)" }; pub const wq_meta: Meta = .{ .description = "wq (write/save file and quit)" };
pub fn x(_: *void, _: Ctx) Result {
try cmd("save_file", command.fmt(.{ "then", .{ "quit", .{} } }));
}
pub const x_meta: Meta = .{ .description = "x (write/save file and quit)" };
pub fn o(_: *void, _: Ctx) Result { pub fn o(_: *void, _: Ctx) Result {
try cmd("open_file", .{}); try cmd("open_file", .{});
} }