Add hotkyes for moving up/down by several lines at a time.

This commit is contained in:
Nathan Vegdahl 2020-02-20 18:01:38 +09:00
parent 9dc3f3aa4c
commit 62bfd9e49c

View File

@ -288,6 +288,13 @@ impl TermUI {
self.editor.cursor_up(1); self.editor.cursor_up(1);
} }
KeyEvent {
code: KeyCode::Up,
modifiers: KeyModifiers::CONTROL,
} => {
self.editor.cursor_up(8);
}
KeyEvent { KeyEvent {
code: KeyCode::Down, code: KeyCode::Down,
modifiers: EMPTY_MOD, modifiers: EMPTY_MOD,
@ -295,6 +302,13 @@ impl TermUI {
self.editor.cursor_down(1); self.editor.cursor_down(1);
} }
KeyEvent {
code: KeyCode::Down,
modifiers: KeyModifiers::CONTROL,
} => {
self.editor.cursor_down(8);
}
KeyEvent { KeyEvent {
code: KeyCode::Left, code: KeyCode::Left,
modifiers: EMPTY_MOD, modifiers: EMPTY_MOD,