summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/keymap.rs43
1 files changed, 39 insertions, 4 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index de569656..b7011c92 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -35,10 +35,10 @@ use std::collections::HashMap;
// f = find_char()
// g = goto (gg, G, gc, gd, etc)
//
-// h = move_char_left(n)
-// j = move_line_down(n)
-// k = move_line_up(n)
-// l = move_char_right(n)
+// h = move_char_left(n) || arrow-left = move_char_left(n)
+// j = move_line_down(n) || arrow-down = move_line_down(n)
+// k = move_line_up(n) || arrow_up = move_line_up(n)
+// l = move_char_right(n) || arrow-right = move_char_right(n)
// : = command line
// ; = collapse selection to cursor
// " = use register
@@ -128,6 +128,24 @@ pub fn default() -> Keymaps {
key!('k') => commands::move_line_up,
key!('l') => commands::move_char_right,
+ KeyEvent {
+ code: KeyCode::Left,
+ modifiers: KeyModifiers::NONE
+ } => commands::move_char_left as Command,
+ 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,
+
+
key!('t') => commands::find_till_char,
key!('f') => commands::find_next_char,
key!('T') => commands::till_prev_char,
@@ -269,6 +287,23 @@ pub fn default() -> Keymaps {
key!('k') => commands::extend_line_up,
key!('l') => commands::extend_char_right,
+ KeyEvent {
+ code: KeyCode::Left,
+ modifiers: KeyModifiers::NONE
+ } => commands::move_char_left as Command,
+ 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,
+
key!('w') => commands::extend_next_word_start,
key!('b') => commands::extend_prev_word_start,
key!('e') => commands::extend_next_word_end,