Merge branch 'master' into zig-0.15

This commit is contained in:
CJ van den Berg 2025-09-27 23:29:42 +02:00
commit b8d2679cbc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 112 additions and 27 deletions

View file

@ -45,11 +45,26 @@ const cmds_ = struct {
}
pub const @"q!_meta": Meta = .{ .description = "q! (quit without saving)" };
pub fn @"qa!"(_: *void, _: Ctx) Result {
try cmd("quit_without_saving", .{});
}
pub const @"qa!_meta": Meta = .{ .description = "qa! (quit without saving)" };
pub fn wq(_: *void, _: Ctx) Result {
try cmd("save_file", command.fmt(.{ "then", .{ "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 rl(_: *void, _: Ctx) Result {
try cmd("reload_file", .{});
}
pub const rl_meta: Meta = .{ .description = "rl (force reload current file)" };
pub fn o(_: *void, _: Ctx) Result {
try cmd("open_file", .{});
}
@ -61,6 +76,26 @@ const cmds_ = struct {
}
pub const @"wq!_meta": Meta = .{ .description = "wq! (write/save file and quit without saving)" };
pub fn n(_: *void, _: Ctx) Result {
try cmd("create_new_file", .{});
}
pub const n_meta: Meta = .{ .description = "n (Create new buffer/tab)" };
pub fn bn(_: *void, _: Ctx) Result {
try cmd("next_tab", .{});
}
pub const bn_meta: Meta = .{ .description = "bn (Next buffer/tab)" };
pub fn bp(_: *void, _: Ctx) Result {
try cmd("previous_tab", .{});
}
pub const bp_meta: Meta = .{ .description = "bp (Previous buffer/tab)" };
pub fn bc(_: *void, _: Ctx) Result {
try cmd("delete_buffer", .{});
}
pub const bc_meta: Meta = .{ .description = "bc (Close buffer/tab)" };
pub fn save_selection(_: *void, _: Ctx) Result {
const logger = log.logger("helix-mode");
defer logger.deinit();