aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/keymap.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-01 02:57:43 +0000
committerGitHub2020-10-01 02:57:43 +0000
commit1da0be0aa045a4acd0246d82bf6214f8ec651476 (patch)
treea6e1ef47c23453503d2728452b16050ae649f440 /helix-view/src/keymap.rs
parent592c5b0af22cc719fc1513f71706dad326ba8081 (diff)
parent13800e4dd152b018b5242de9fbdd470b23bd9c4a (diff)
Merge pull request #1 from helix-editor/insertKeymapMove
moved insert keymap to keymap.rs
Diffstat (limited to 'helix-view/src/keymap.rs')
-rw-r--r--helix-view/src/keymap.rs18
1 files changed, 18 insertions, 0 deletions
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,
)
)
}