mirror of
https://github.com/openai/codex.git
synced 2026-10-26 18:38:47 +00:00
Add Vim buffer jump motions (#40958)
## What changed - Add `gg` and `G` motions to jump to the first and last buffer lines. - Support the motions with delete, change, and yank operators, including dot-repeat for edits. - Expose normal-mode and operator-motion bindings in the configurable keymap while preserving conflicting user bindings. ## Testing - Cover buffer jumps, operator combinations, repeat behavior, chord routing, and custom remapping. GitOrigin-RevId: 24a9178cf7964053aaf9a8cd268c5434dda0778e
This commit is contained in:
committed by
copyberry
parent
6ac012a0d4
commit
d47e5cc0e2
@@ -243,6 +243,10 @@ pub struct TuiVimNormalKeymap {
|
||||
pub till_forward: Option<KeybindingsSpec>,
|
||||
/// Stop after the previous character on the current line (`T`).
|
||||
pub till_backward: Option<KeybindingsSpec>,
|
||||
/// Begin a jump to the first buffer line (`gg`).
|
||||
pub jump_top: Option<KeybindingsSpec>,
|
||||
/// Jump to the last buffer line (`G`).
|
||||
pub jump_bottom: Option<KeybindingsSpec>,
|
||||
/// Delete character under cursor (`x`).
|
||||
pub delete_char: Option<KeybindingsSpec>,
|
||||
/// Replace the character under the cursor (`r`).
|
||||
@@ -308,6 +312,10 @@ pub struct TuiVimOperatorKeymap {
|
||||
pub motion_till_forward: Option<KeybindingsSpec>,
|
||||
/// Motion: stop after the previous character on the current line (`T`).
|
||||
pub motion_till_backward: Option<KeybindingsSpec>,
|
||||
/// Motion: begin a jump to the first buffer line (`gg`).
|
||||
pub motion_jump_top: Option<KeybindingsSpec>,
|
||||
/// Motion: jump to the last buffer line (`G`).
|
||||
pub motion_jump_bottom: Option<KeybindingsSpec>,
|
||||
/// Select an inner text object after an operator.
|
||||
pub select_inner_text_object: Option<KeybindingsSpec>,
|
||||
/// Select an around text object after an operator.
|
||||
|
||||
Reference in New Issue
Block a user