From 0c0c2c71034e264204a2ce6d4fd7a17ddbc2245f Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Thu, 8 Oct 2020 00:02:32 +0200 Subject: modified editor.render() to prepare for command mode rendering --- helix-view/src/keymap.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'helix-view/src/keymap.rs') diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs index c3a4b8e7..96a37e6b 100644 --- a/helix-view/src/keymap.rs +++ b/helix-view/src/keymap.rs @@ -163,6 +163,7 @@ pub fn default() -> Keymaps { vec![key!('p')] => commands::paste, vec![key!('>')] => commands::indent, vec![key!('<')] => commands::unindent, + vec![key!(':')] => commands::command_mode, vec![Key { code: KeyCode::Esc, modifiers: Modifiers::NONE @@ -207,6 +208,12 @@ pub fn default() -> Keymaps { }] => commands::normal_mode as Command, vec![key!('g')] => commands::move_file_start as Command, vec![key!('e')] => commands::move_file_end as Command, + ), + state::Mode::Command => hashmap!( + vec![Key { + code: KeyCode::Esc, + modifiers: Modifiers::NONE + }] => commands::normal_mode as Command, ) ) } -- cgit v1.2.3-70-g09d2