-
Notifications
You must be signed in to change notification settings - Fork 6.6k
feat(tui): add Vim editing mode with runtime /vim toggle #3044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tui): add Vim editing mode with runtime /vim toggle #3044
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
I am glad that someone is making it ! |
|
As a long time Vim user who feels most comfortable editing text in Vim, I'm hesitant to add a Vim emulation mode to the prompt textbox. The reason is that I generally find Vim emulations that are not actually Vim frustrate me more than they delight me, as inevitably they do not support some feature which I rely on to feel comfortable in Vim, e.g. Would it perhaps make sense to instead add a keyboard shortcut to edit the current prompt with |
|
I echo the sentiments of @nornagon-openai , particularly if basic operations like 3cw aren't even implemented. Is there no rust line editor library like readline/libedit that already contains a more fully featured vi mode implementation? Ideally it would automatically check ~/.inputrc file for the line:
and set vi mode automatically. Alternatively I think there is a strong argument for a feature where you type something like |
|
I hope Vim mode makes its way into the TUI. As a long-time Vim user who has enjoyed Vim mode in other agentic coding tools, I find its absence here very inconvenient. The efficiency and flow that Vim keybindings provide are hard to match. I understand the purity arguments against it, but the real-world experience may tell a better story. Just imagine working in the TUI with the bindings, and then having them stripped away. That would create more pain than otherwise. As for bindings, even a simple set works well. Commands such as . or @ are not necessary. If you find yourself needing those, it is probably a sign you would be better off editing the document in an external editor. |
|
I propose shipping both:
This keeps the default experience unchanged while giving power users a safe subset. If that direction sounds good, I’ll split it into two PRs (external editor first), add a cheatsheet and clear “what’s not implemented” notes, and wire a kill-switch so we can turn it off if needed. |
Appreciate the comment! |
…state handling, and docs update
…tions wiring, updating composer/bottom-pane constructors and tests, and aligning default-client/MCP assertions with the dynamic originator so the full test suite passes.
|
Updated |
@nornagon-openai |
|
I've been testing this patch for about a week (used codex to rebase it against main!) and it works great. It would be nice to have this and a
Great work, thanks! |
Thanks a ton for taking this for a spin (and even rebasing it)—really appreciate the feedback!
I’ve noted both ideas so we can revisit them after the MVP lands. Thanks again! |
So they are, not sure how I missed this. Great!
Visual mode would be even better!
|
|
Thanks for the contribution, and apologies for the slow response. We've received many PRs, and we don't have the bandwidth on the codex team to review all of them. We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap. If you would like to propose a new feature, please file or upvote an enhancement request in the issue tracker. We will generally prioritize new features based on community feedback. |
|
Please vote for this idea here |
cd codex-rs && cargo test -p codex-tuicargo run -p codex-tui -- -c tui.editor_keymap=vim, then verify Normal/Insert, movement/edit keys, and /vim toggle