feat: add more vim keybinds
This is a combination of 6 commits. - added a new command - change dd to use cut - add prototypes for A I o O commands - fixed keybind test compilation bug - add keybinds for the new enter_mode commands - added prototype for copy line
This commit is contained in:
parent
0a75e04c3a
commit
c909a2a50a
4 changed files with 87 additions and 3 deletions
|
@ -44,4 +44,72 @@ const cmds_ = struct {
|
|||
try cmd("quit_without_saving", .{});
|
||||
}
|
||||
pub const @"wq!_meta" = .{ .description = "wq! (write file and quit without saving)" };
|
||||
|
||||
pub fn enter_mode_at_next_char(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
|
||||
pub const enter_mode_at_next_char_meta = .{ .description = "Move forward one char and change mode" };
|
||||
|
||||
pub fn enter_mode_on_newline_down(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
|
||||
pub const enter_mode_on_newline_down_meta = .{ .description = "Insert a newline and change mode" };
|
||||
|
||||
pub fn enter_mode_on_newline_up(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
pub const enter_mode_on_newline_up_meta = .{ .description = "Insert a newline above the current line and change mode" };
|
||||
|
||||
pub fn enter_mode_at_line_begin(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
|
||||
pub const enter_mode_at_line_begin_meta = .{ .description = "Goto line begin and change mode" };
|
||||
|
||||
pub fn enter_mode_at_line_end(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
pub const enter_mode_at_line_end_meta = .{ .description = "Goto line end and change mode" };
|
||||
|
||||
pub fn copy_line(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
}
|
||||
|
||||
pub const copy_line_meta = .{ .description = "Copies the current line" };
|
||||
|
||||
pub fn delete_line(self: *void, ctx: Ctx) Result {
|
||||
_ = self; // autofix
|
||||
_ = ctx; // autofix
|
||||
//TODO
|
||||
return undefined;
|
||||
//try self.move_begin(ctx);
|
||||
//const b = try self.buf_for_update();
|
||||
//var root = try self.delete_to(move_cursor_end, b.root, b.allocator);
|
||||
//root = try self.delete_to(move_cursor_right, b.root, b.allocator);
|
||||
//try self.delete_forward(ctx);
|
||||
//try self.update_buf(root);
|
||||
//self.clamp();
|
||||
}
|
||||
pub const delete_line_meta = .{ .description = "Delete the current line without copying" };
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue