Skip to content

feat(nav): add j/k vim-style navigation to all TUI menus#479

Open
dudeinthemirror wants to merge 1 commit into
mainfrom
feature/add-vim-nav
Open

feat(nav): add j/k vim-style navigation to all TUI menus#479
dudeinthemirror wants to merge 1 commit into
mainfrom
feature/add-vim-nav

Conversation

@dudeinthemirror

@dudeinthemirror dudeinthemirror commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds vim-style j/k keybindings (down/up) to every interactive prompt_toolkit panel, sitting alongside the existing arrow keys and Ctrl+P/Ctrl+N bindings.

jk

Panels updated

File Notes
command_line/agent_menu.py j/k added, hint text updated
command_line/autosave_menu.py works in both normal and browse mode
command_line/colors_menu.py split-panel selector updated
command_line/judges_menu.py main list + model-list section (filtered so j/k type normally in TextArea)
command_line/mcp_binding_menu.py agent-binding panel + post-install bind panel
command_line/model_settings_menu.py both models and settings view levels
command_line/set_menu.py smart mode: navigates when idle, types into search buffer when / search is active
command_line/uc_menu.py both list_kb and source_kb bindings
tools/common.py arrow_select_async + arrow_select (sync)

Bug fix included

Fixed a syntax error in arrow_select() (sync) where the try: asyncio.get_running_loop() block was accidentally replaced with an invalid with suspended_key_listener(): await app.run_async() — mixing async into a sync function and leaving a dangling except with no try.

Testing

All 2190 tests pass across tests/command_line/ and tests/tools/test_common*.py.

Add vim-style j/k keybindings (up/down) alongside existing arrow keys
and Ctrl+P/N across all interactive prompt_toolkit panels:

- command_line/agent_menu.py
- command_line/autosave_menu.py
- command_line/colors_menu.py
- command_line/judges_menu.py
- command_line/mcp_binding_menu.py
- command_line/model_settings_menu.py
- command_line/set_menu.py  (smart: types normally in search mode)
- command_line/uc_menu.py
- tools/common.py (arrow_select + arrow_select_async)

Also fix syntax error in arrow_select() where try/asyncio.get_running_loop()
was accidentally replaced with an invalid with/await block.
@mpfaffenberger

Copy link
Copy Markdown
Owner

Hey @dudeinthemirror some of the menus are listening for search strings when you type. How would j/k interaction work with those?

@dudeinthemirror

dudeinthemirror commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Hey @dudeinthemirror some of the menus are listening for search strings when you type. How would j/k interaction work with those?

yeah, I excluded those ones (like /model or / (to display a dropdown of commands))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants