mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 08:02:11 +00:00
feat(tui): add character jump navigation (Ctrl+], Ctrl+Alt+]) (#1074)
Add Bash/Readline-style character search: - Ctrl+] enters forward jump mode, awaits next character, jumps to it - Ctrl+Alt+] does the same but searches backward - Multi-line search - Case-sensitive matching - Pressing the hotkey again cancels; control chars cancel and fall through
This commit is contained in:
parent
e20583aac8
commit
c5d16fe456
6 changed files with 304 additions and 1 deletions
|
|
@ -13,6 +13,8 @@ export type EditorAction =
|
|||
| "cursorWordRight"
|
||||
| "cursorLineStart"
|
||||
| "cursorLineEnd"
|
||||
| "jumpForward"
|
||||
| "jumpBackward"
|
||||
| "pageUp"
|
||||
| "pageDown"
|
||||
// Deletion
|
||||
|
|
@ -72,6 +74,8 @@ export const DEFAULT_EDITOR_KEYBINDINGS: Required<EditorKeybindingsConfig> = {
|
|||
cursorWordRight: ["alt+right", "ctrl+right", "alt+f"],
|
||||
cursorLineStart: ["home", "ctrl+a"],
|
||||
cursorLineEnd: ["end", "ctrl+e"],
|
||||
jumpForward: "ctrl+]",
|
||||
jumpBackward: "ctrl+alt+]",
|
||||
pageUp: "pageUp",
|
||||
pageDown: "pageDown",
|
||||
// Deletion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue