summaryrefslogtreecommitdiff
path: root/helix-view/src/keymap.rs
diff options
context:
space:
mode:
authorJan Hrastnik2020-10-04 21:47:37 +0000
committerJan Hrastnik2020-10-04 21:47:37 +0000
commit038201647c657b2b07fa7f87aae3c609c59c77ef (patch)
tree263fd1c32f17f1aef5fdcce92d7a4fc21aa895f2 /helix-view/src/keymap.rs
parentb7e1c0cf8253703a5eeb8453de23c8d0a6137ef1 (diff)
started work on goto mode
Diffstat (limited to 'helix-view/src/keymap.rs')
-rw-r--r--helix-view/src/keymap.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs
index ef23ff2a..c93c3c1f 100644
--- a/helix-view/src/keymap.rs
+++ b/helix-view/src/keymap.rs
@@ -126,6 +126,7 @@ pub fn default() -> Keymaps {
vec![key!('w')] => commands::move_next_word_start,
vec![key!('b')] => commands::move_prev_word_start,
vec![key!('e')] => commands::move_next_word_end,
+ vec![key!('g')] => commands::goto_mode,
vec![key!('i')] => commands::insert_mode,
vec![shift!('I')] => commands::prepend_to_line,
vec![key!('a')] => commands::append_mode,
@@ -161,6 +162,14 @@ pub fn default() -> Keymaps {
code: KeyCode::Tab,
modifiers: Modifiers::NONE
}] => commands::insert_tab,
+ ),
+ state::Mode::Goto => hashmap!(
+ vec![Key {
+ code: KeyCode::Esc,
+ modifiers: Modifiers::NONE
+ }] => commands::normal_mode as Command,
+ vec![key!('g')] => commands::move_file_start as Command,
+ vec![key!('e')] => commands::move_file_end as Command,
)
)
}