From 22297d0b40ae43764d531bf0416ff22abbdfb61a Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Sun, 16 Jan 2022 09:41:21 +0800 Subject: [PATCH] Add alt-backspace, alt-<, alt->, ctrl-j to insert mode (#1441) * add alt-backspace keymap to delete word backward * add more useful keymap * map to correct command * add C-j to insert_newline --- helix-term/src/keymap.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 49f8469a..c4bd25ed 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -751,8 +751,10 @@ impl Default for Keymaps { "del" => delete_char_forward, "C-d" => delete_char_forward, "ret" => insert_newline, + "C-j" => insert_newline, "tab" => insert_tab, "C-w" => delete_word_backward, + "A-backspace" => delete_word_backward, "A-d" => delete_word_forward, "left" => move_char_left, @@ -767,6 +769,8 @@ impl Default for Keymaps { "A-left" => move_prev_word_end, "A-f" => move_next_word_start, "A-right" => move_next_word_start, + "A-<" => goto_file_start, + "A->" => goto_file_end, "pageup" => page_up, "pagedown" => page_down, "home" => goto_line_start,