From f7b8a0bc78ca126018ab5536fb7beb45cc6a53d4 Mon Sep 17 00:00:00 2001 From: Alvaro Parker Date: Thu, 10 Oct 2024 13:30:53 -0300 Subject: [PATCH] Add vim motions --- crates/turborepo-ui/src/tui/input.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/turborepo-ui/src/tui/input.rs b/crates/turborepo-ui/src/tui/input.rs index c23cb9025b7f9..f2215b2adbc05 100644 --- a/crates/turborepo-ui/src/tui/input.rs +++ b/crates/turborepo-ui/src/tui/input.rs @@ -76,6 +76,9 @@ fn translate_key_event(options: InputOptions, key_event: KeyEvent) -> Option Some(Event::Input { bytes: encode_key(key_event), }), + // Vim keybinds + KeyCode::Char('j') => Some(Event::Down), + KeyCode::Char('k') => Some(Event::Up), // If we're on the list and user presses `/` enter search mode KeyCode::Char('/') if matches!(options.focus, LayoutSections::TaskList) => { Some(Event::SearchEnter)