From 43e008413d818dee6a3243c68be6731592419a2b Mon Sep 17 00:00:00 2001 From: VuiMuich Date: Mon, 18 Oct 2021 18:25:11 +0200 Subject: [PATCH 1/2] Add `C-j` and `C-k` for moving down/up in pickers --- helix-term/src/ui/picker.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 9be2a73e2036..6f584178a624 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -336,6 +336,10 @@ impl Component for Picker { code: KeyCode::BackTab, .. } + | KeyEvent { + code: KeyCode::Char('k'), + modifiers: KeyModifiers::CONTROL, + } | KeyEvent { code: KeyCode::Char('p'), modifiers: KeyModifiers::CONTROL, @@ -349,6 +353,10 @@ impl Component for Picker { | KeyEvent { code: KeyCode::Tab, .. } + | KeyEvent { + code: KeyCode::Char('j'), + modifiers: KeyModifiers::CONTROL, + } | KeyEvent { code: KeyCode::Char('n'), modifiers: KeyModifiers::CONTROL, From c481692e339160ddda4c20dd896a6ec42acbecaf Mon Sep 17 00:00:00 2001 From: VuiMuich Date: Tue, 19 Oct 2021 07:05:36 +0200 Subject: [PATCH 2/2] Add new binds to keymap doc --- book/src/keymap.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/book/src/keymap.md b/book/src/keymap.md index 156b1d99f8ad..1e19a4eb4d04 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -242,12 +242,12 @@ commands (including goto) to extend the existing selection instead of replacing Keys to use within picker. Remapping currently not supported. -| Key | Description | -| ----- | ------------- | -| `Up`, `Ctrl-p` | Previous entry | -| `Down`, `Ctrl-n` | Next entry | -| `Ctrl-space` | Filter options | -| `Enter` | Open selected | -| `Ctrl-h` | Open horizontally | -| `Ctrl-v` | Open vertically | -| `Escape`, `Ctrl-c` | Close picker | +| Key | Description | +| ----- | ------------- | +| `Up`, `Ctrl-k`, `Ctrl-p` | Previous entry | +| `Down`, `Ctrl-j`, `Ctrl-n` | Next entry | +| `Ctrl-space` | Filter options | +| `Enter` | Open selected | +| `Ctrl-h` | Open horizontally | +| `Ctrl-v` | Open vertically | +| `Escape`, `Ctrl-c` | Close picker |