refactor: add explicit command for initializing helix select mode
This commit is contained in:
parent
c65583b1ae
commit
dd88be893e
2 changed files with 7 additions and 1 deletions
|
|
@ -282,7 +282,7 @@
|
|||
"line_numbers": "relative",
|
||||
"cursor": "block",
|
||||
"selection": "inclusive",
|
||||
"init_command": ["enable_selection"],
|
||||
"init_command": ["init_helix_select_mode"],
|
||||
"press": [
|
||||
|
||||
["ctrl+b", "select_page_up"],
|
||||
|
|
|
|||
|
|
@ -240,6 +240,12 @@ const cmds_ = struct {
|
|||
}
|
||||
pub const extend_line_below_meta: Meta = .{ .arguments = &.{.integer}, .description = "Select current line, if already selected, extend to next line" };
|
||||
|
||||
pub fn init_helix_select_mode(_: *void, _: Ctx) Result {
|
||||
_, const ed = get_context() orelse return;
|
||||
try ed.enable_selection(.{});
|
||||
}
|
||||
pub const init_helix_select_mode_meta: Meta = .{};
|
||||
|
||||
pub fn move_next_word_start(_: *void, ctx: Ctx) Result {
|
||||
try move_to_word(ctx, Editor.move_cursor_word_right_vim, .forwards);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue