From 73961adfa1e16847635fbccd6c6e20b97f74a637 Mon Sep 17 00:00:00 2001 From: Yan Ivnitskiy Date: Fri, 23 Jan 2026 15:47:46 -0500 Subject: feat: add more vim movement bindings for navigation (#3041) Add vim-style movement commands to vim_normal keymap mode: - Ctrl+u/d: half-page up/down - Ctrl+b/f: full-page up/down - G: jump to visual bottom of history - gg: jump to visual top of history (multi-key sequence) - H/M/L: jump to top/middle/bottom of visible screen Also adds `offset()` getter to ListState for H/M/L functionality, and includes tests for the new bindings. ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing Co-authored-by: Claude Opus 4.5 --- docs/docs/configuration/key-binding.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/docs/configuration/key-binding.md b/docs/docs/configuration/key-binding.md index 81e430f2..42940be2 100644 --- a/docs/docs/configuration/key-binding.md +++ b/docs/docs/configuration/key-binding.md @@ -234,12 +234,28 @@ $env.config = ( ### Vim mode If [vim is enabled in the config](config.md#keymap_mode), the following keybindings are enabled: -| Shortcut | Mode | Action | -| -------- | ------ | ------------------------------------- | -| k | Normal | Selects the next item on the list | -| j | Normal | Selects the previous item on the list | -| i | Normal | Enters insert mode | -| Esc | Insert | Enters normal mode | +| Shortcut | Mode | Action | +| -------- | ------ | ------------------------------------------ | +| k | Normal | Selects the next item on the list | +| j | Normal | Selects the previous item on the list | +| h | Normal | Move cursor left | +| l | Normal | Move cursor right | +| i | Normal | Enters insert mode | +| I | Normal | Move to start of line and enter insert | +| a | Normal | Move right and enter insert mode | +| A | Normal | Move to end of line and enter insert | +| Ctrl+u | Normal | Half-page up (toward visual top) | +| Ctrl+d | Normal | Half-page down (toward visual bottom) | +| Ctrl+b | Normal | Full-page up (toward visual top) | +| Ctrl+f | Normal | Full-page down (toward visual bottom) | +| G | Normal | Jump to visual bottom of history | +| gg | Normal | Jump to visual top of history | +| H | Normal | Jump to top of visible screen | +| M | Normal | Jump to middle of visible screen | +| L | Normal | Jump to bottom of visible screen | +| ? or / | Normal | Clear input and enter insert mode | +| 1-9 | Normal | Select item by number | +| Esc | Insert | Enters normal mode | ### Inspector -- cgit v1.3.1