From 94c3362cba03bdd83bf6ed303fe90433e25cb903 Mon Sep 17 00:00:00 2001 From: Antoni Stevent Date: Thu, 3 Jun 2021 11:53:03 +0200 Subject: [PATCH] extend insert mode with up/down/right/left and home/end key mappings --- helix-term/src/keymap.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index fc7bb86e8ab3..72831c61dff1 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -321,6 +321,30 @@ pub fn default() -> Keymaps { code: KeyCode::Tab, modifiers: KeyModifiers::NONE } => commands::insert::insert_tab, + KeyEvent { + code: KeyCode::Left, + modifiers: KeyModifiers::NONE + } => commands::move_char_left, + KeyEvent { + code: KeyCode::Down, + modifiers: KeyModifiers::NONE + } => commands::move_line_down, + KeyEvent { + code: KeyCode::Up, + modifiers: KeyModifiers::NONE + } => commands::move_line_up, + KeyEvent { + code: KeyCode::Right, + modifiers: KeyModifiers::NONE + } => commands::move_char_right, + KeyEvent { + code: KeyCode::Home, + modifiers: KeyModifiers::NONE + } => commands::move_line_start, + KeyEvent { + code: KeyCode::End, + modifiers: KeyModifiers::NONE + } => commands::move_line_end, ctrl!('x') => commands::completion, ),