From dd94a3981067a11c3d42caef32e3d9c93e1ec357 Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Thu, 1 Oct 2020 01:15:42 +0200 Subject: moved insert keymap to keymap.rs --- helix-view/src/keymap.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'helix-view/src/keymap.rs') diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs index 078f2bf1..512dcbdb 100644 --- a/helix-view/src/keymap.rs +++ b/helix-view/src/keymap.rs @@ -182,6 +182,24 @@ pub fn default() -> Keymaps { code: KeyCode::Esc, modifiers: Modifiers::NONE }] => commands::normal_mode as Command, + ), + state::Mode::Insert => hashmap!( + vec![Key { + code: KeyCode::Esc, + modifiers: Modifiers::NONE + }] => commands::normal_mode as Command, + vec![Key { + code: KeyCode::Backspace, + modifiers: Modifiers::NONE + }] => commands::delete_char_backward as Command, + vec![Key { + code: KeyCode::Delete, + modifiers: Modifiers::NONE + }] => commands::delete_char_forward as Command, + vec![Key { + code: KeyCode::Enter, + modifiers: Modifiers::NONE + }] => commands::insert_newline as Command, ) ) } -- cgit v1.2.3-70-g09d2