add default keymaps for overtype edit mode

pull/11265/head
Noktoborus 4 months ago
parent d42b199ccc
commit 720124e14b

@ -332,6 +332,7 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"C-a" => increment, "C-a" => increment,
"C-x" => decrement, "C-x" => decrement,
"ins" => insert_mode,
}); });
let mut select = normal.clone(); let mut select = normal.clone();
select.merge_nodes(keymap!({ "Select mode" select.merge_nodes(keymap!({ "Select mode"
@ -394,9 +395,28 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"pagedown" => page_down, "pagedown" => page_down,
"home" => goto_line_start, "home" => goto_line_start,
"end" => goto_line_end_newline, "end" => goto_line_end_newline,
"ins" => overtype_mode,
}); });
let overtype = keymap!({ "Overtype mode" let overtype = keymap!({ "Overtype mode"
"ins" => insert_mode,
"esc" => normal_mode, "esc" => normal_mode,
"C-s" => commit_undo_checkpoint,
"C-w" | "A-backspace" => delete_word_backward,
"A-d" | "A-del" => delete_word_forward,
"C-h" | "backspace" | "S-backspace" => delete_char_backward,
"C-d" | "del" => delete_char_forward,
"C-j" | "ret" => insert_newline,
"up" => move_visual_line_up,
"down" => move_visual_line_down,
"left" => move_char_left,
"right" => move_char_right,
"pageup" => page_up,
"pagedown" => page_down,
"home" => goto_line_start,
"end" => goto_line_end_newline,
}); });
hashmap!( hashmap!(
Mode::Normal => normal, Mode::Normal => normal,

Loading…
Cancel
Save