Compare commits
5 commits
e953da7d86
...
a5d3eb18f3
| Author | SHA1 | Date | |
|---|---|---|---|
| a5d3eb18f3 | |||
|
|
1ade0b1b89 | ||
|
|
2390590279 | ||
|
|
21384b7a5f | ||
|
|
9db6bf56c1 |
2 changed files with 44 additions and 5 deletions
|
|
@ -14,6 +14,7 @@
|
|||
["ctrl+f", "move_scroll_page_down"],
|
||||
["ctrl+u", "move_scroll_half_page_up"],
|
||||
["ctrl+d", "move_scroll_half_page_down"],
|
||||
["z z", "scroll_view_center"],
|
||||
["ctrl+c", "toggle_comment"],
|
||||
["ctrl+i", "jump_forward"],
|
||||
["ctrl+o", "jump_back"],
|
||||
|
|
@ -191,6 +192,7 @@
|
|||
["u", "undo"],
|
||||
|
||||
["y", ["enable_selection"], ["copy_helix"], ["enter_mode", "normal"]],
|
||||
["%", "select_all"],
|
||||
["p", "paste_after"],
|
||||
|
||||
["q", "record_macro"],
|
||||
|
|
@ -213,7 +215,7 @@
|
|||
["space R", "replace_selections_with_clipboard"],
|
||||
["space ?", "open_command_palette"],
|
||||
["space f", "find_file"],
|
||||
["space b", "buffer_picker"],
|
||||
["space b", "switch_buffers"],
|
||||
["space j", "jumplist_picker"],
|
||||
["space s", "symbol_picker"],
|
||||
["space d", "diagnostics_picker"],
|
||||
|
|
@ -221,7 +223,7 @@
|
|||
["space '", "last_picker"],
|
||||
["space y", "copy"],
|
||||
["space p", "system_paste_after"],
|
||||
["space /", "find_in_file"],
|
||||
["space /", "find_in_files"],
|
||||
["space k", "hover"],
|
||||
["space r", "rename_symbol"],
|
||||
["space h", "select_references_to_symbol_under_cursor"],
|
||||
|
|
@ -265,6 +267,7 @@
|
|||
["ctrl+f", "select_page_down"],
|
||||
["ctrl+u", "select_half_page_up"],
|
||||
["ctrl+d", "select_half_page_down"],
|
||||
["z z", "scroll_view_center"],
|
||||
|
||||
["ctrl+c", "toggle_comment"],
|
||||
|
||||
|
|
@ -390,6 +393,7 @@
|
|||
["kp_down", "select_down"],
|
||||
["kp_up", "select_up"],
|
||||
["kp_right", "select_right"],
|
||||
["%", "select_all"],
|
||||
|
||||
["t", "extend_till_char"],
|
||||
["f", "move_to_char", "select_to_char_right_helix"],
|
||||
|
|
@ -497,8 +501,8 @@
|
|||
["space R", "replace_selections_with_clipboard"],
|
||||
["space ?", "open_command_palette"],
|
||||
|
||||
["space f", "file_picker"],
|
||||
["space b", "buffer_picker"],
|
||||
["space f", "find_file"],
|
||||
["space b", "switch_buffers"],
|
||||
["space j", "jumplist_picker"],
|
||||
["space s", "symbol_picker"],
|
||||
["space d", "diagnostics_picker"],
|
||||
|
|
@ -506,7 +510,7 @@
|
|||
["space '", "last_picker"],
|
||||
["space y", "copy"],
|
||||
["space p", "system_paste_after"],
|
||||
["space /", "find_in_file"],
|
||||
["space /", "find_in_files"],
|
||||
["space k", "hover"],
|
||||
["space r", "rename_symbol"],
|
||||
["space h", "select_references_to_symbol_under_cursor"],
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue