on master help sign in
Resolve conflicts between prompt/picker bindings (#1792)

Currently, the picker's re-using a few bindings which are also present in the prompt. This causes some editing behaviours to not function on the picker. **Ctrl + k** and **Ctrl + j** This should kill till the end of the line on prompt, but is overridden by the picker for scrolling. Since there are redundancies (`Ctrl + p`, `Ctrl + n`), we can remove it from picker. **Ctrl + f** and **Ctrl + b** This are used by the prompt for back/forward movement. We could modify it to be Ctrl + d and Ctrl + u, to match the `vim` behaviour.

commit5d61631507143194594f1dff6af9f862ce79992e authorRohan Jain <343499+crodjer@users.noreply.github.com> dateThu 31 Mar 2022, 13:21 (5 years ago) parentef91b65
2 files changed+8−8
book/src/keymap.md+4−4 helix-term/src/ui/picker.rs+4−4
book/src/keymap.md+4−4
@@ -331,10 +331,10 @@ Keys to use within picker. Remapping currently not supported.
331331
332332| Key | Description |
333333| ----- | ------------- |
334−| `Up`, `Ctrl-k`, `Ctrl-p` | Previous entry |
335−| `PageUp`, `Ctrl-b` | Page up |
336−| `Down`, `Ctrl-j`, `Ctrl-n` | Next entry |
337−| `PageDown`, `Ctrl-f` | Page down |
334+| `Up`, `Ctrl-p` | Previous entry |
335+| `PageUp`, `Ctrl-u` | Page up |
336+| `Down`, `Ctrl-n` | Next entry |
337+| `PageDown`, `Ctrl-d` | Page down |
338338| `Home` | Go to first entry |
339339| `End` | Go to last entry |
340340| `Ctrl-space` | Filter options |
helix-term/src/ui/picker.rs+4−4
@@ -498,16 +498,16 @@ impl<T: 'static> Component for Picker<T> {
498498 })));
499499
500500 match key_event.into() {
501− shift!(Tab) | key!(Up) | ctrl!('p') | ctrl!('k') => {
501+ shift!(Tab) | key!(Up) | ctrl!('p') => {
502502 self.move_by(1, Direction::Backward);
503503 }
504− key!(Tab) | key!(Down) | ctrl!('n') | ctrl!('j') => {
504+ key!(Tab) | key!(Down) | ctrl!('n') => {
505505 self.move_by(1, Direction::Forward);
506506 }
507− key!(PageDown) | ctrl!('f') => {
507+ key!(PageDown) | ctrl!('d') => {
508508 self.page_down();
509509 }
510− key!(PageUp) | ctrl!('b') => {
510+ key!(PageUp) | ctrl!('u') => {
511511 self.page_up();
512512 }
513513 key!(Home) => {