feat(cli): add /editor to compose prompts in $EDITOR#194
Merged
emal-avala merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Opens $VISUAL → $EDITOR → vim → vi → nano on a tempfile, reads the contents back when the editor exits, and submits them as the user turn. Empty content cancels. Lines starting with # are stripped (so the pre-fill hint doesn't leak into the prompt). > /editor (vim opens; write multi-line prompt; :wq) <agent receives the composed prompt and responds> > /editor initial draft text (editor opens pre-filled with "initial draft text") Unblocks the most-requested readline limitation: composing a long, multi-paragraph prompt without wrangling rustyline's single-line input and `\` continuations. Alias: /ed
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
/editorslash command (alias/ed) that opens the user's editor on a tempfile, then submits the contents as the user turn when the editor exits.Why
rustyline is great for one-liners but painful for multi-paragraph prompts —
\continuations and no way to scroll back through what you've typed. `/editor` solves the most-requested readline limitation: compose long prompts in your real editor where tab/indent/copy-paste all work.Editor resolution
$VISUAL$EDITORvimif on PATHviif on PATHnanoif on PATHReturns a helpful error if none are found.
Behaviour details
#are stripped (so the pre-fill hint at the bottom of a blank file doesn't leak into the prompt)/editor first draft textopens the editor already containing that text.mdsuffix so editors with markdown modes get syntax highlightingTest plan