[Feature Request] Add configurable editor option for Ctrl+G shortcut
Status Fixed / completed
Reported on v2.0.76
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Jan 5, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
Add an option to configure the editor that opens with Ctrl+G
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.76
- Feedback ID: fe23afc6-53e7-4aa3-acee-0b5654a64ed6
4 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Adding detailed context from #18990:
Problem: Ctrl+G auto-detects installed IDEs rather than respecting
EDITOR/VISUALenvironment variables. With Cursor IDE installed, pressing Ctrl+G launches the full IDE just to edit a few lines of prompt text—extremely heavyweight when I haveEDITORconfigured to use a lightweight text editor.Proposed solutions:
EDITOR/VISUALenvironment variables for Ctrl+G (consistent with Unix conventions)~/.claude/settings.json(e.g.,"promptEditor": "/usr/bin/vim")Use cases:
See #18990 for the full write-up.
https://github.com/anthropics/claude-code/issues/18990#issuecomment-3940128383
already posted in the other issue but worth repeating here:
i managed to build a good solution:
https://github.com/gradigit/claude-pager
by using a shim like claude-pager, you can set ctrl-g to whatever editor you want, and i have it setup so you set it within your claude settings.json intuitively.
i know it's still a shim and a workaround, but claude-pager also resolves the issue of claude code window going blank when you ctrl-g.
as a bonus, because i use ctrl-g a lot, i made a purpose-built prompt editor specifically for ctrl-g, focused purely on performance:
https://github.com/gradigit/turbodraft
now im able to ctrl-g and start typing immediately in ~50ms, with full session context.
You can already configure this: the Ctrl+G external editor honors your
$VISUALenvironment variable first, then$EDITOR. For exampleexport VISUAL="code --wait"(ornvim,zed --wait, etc.) in your shell profile, or put it in theenvblock of your Claude Code settings so it applies only to Claude Code. See https://code.claude.com/docs/en/interactive-mode (the Ctrl+G row) and https://code.claude.com/docs/en/settings#environment-variables🤖 Generated with Claude Code