From 62bfd9e49c6481e5cf6cb79305358cd7e0e7fa5f Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Thu, 20 Feb 2020 18:01:38 +0900 Subject: [PATCH] Add hotkyes for moving up/down by several lines at a time. --- src/term_ui/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/term_ui/mod.rs b/src/term_ui/mod.rs index 3ec49ad..506d530 100644 --- a/src/term_ui/mod.rs +++ b/src/term_ui/mod.rs @@ -288,6 +288,13 @@ impl TermUI { self.editor.cursor_up(1); } + KeyEvent { + code: KeyCode::Up, + modifiers: KeyModifiers::CONTROL, + } => { + self.editor.cursor_up(8); + } + KeyEvent { code: KeyCode::Down, modifiers: EMPTY_MOD, @@ -295,6 +302,13 @@ impl TermUI { self.editor.cursor_down(1); } + KeyEvent { + code: KeyCode::Down, + modifiers: KeyModifiers::CONTROL, + } => { + self.editor.cursor_down(8); + } + KeyEvent { code: KeyCode::Left, modifiers: EMPTY_MOD,