<p>And there you are, in that modest input field at the bottom of the terminal, fingers starting to itch for some actual editing.</p><p>That's where Ctrl+G shows up and quietly saves the day.</p><h2>What Ctrl+G does in Elyra</h2><p>The short version: <strong>Ctrl+G opens whatever you're writing in your external editor.</strong></p><p>In the keybindings table it's listed as <code>app.editor.external</code>, and it does one thing very well. It takes the contents of your prompt field, opens it in the editor you've configured via <code>$VISUAL</code> or <code>$EDITOR</code>, and the moment you save and close – your text is back in Elyra, ready to send.</p><pre><code>$VISUAL  → Elyra's first choice
$EDITOR  → fallback if VISUAL isn't set
</code></pre><p>Set neither, and the system falls back to whatever your OS considers default – typically <code>vi</code> on Unix systems. (Yes, that's a lesson plenty of us have learned the hard way.)</p><h2>Why this shortcut exists</h2><p>Because a TUI prompt is wonderful for short questions, but genuinely awkward for:</p><ul><li><p>Longer, structured prompts with headings, lists, and code blocks</p></li><li><p>Pasting in large chunks of text you want to tidy up before sending</p></li><li><p>Multi-line editing where you want to jump around, search, and use the shortcuts that already live in your muscle memory</p></li><li><p>Syntax highlighting when you're writing markdown or code inside the prompt</p></li></ul><p>With Ctrl+G, the full power of your editor – Vim, Neovim, Helix, nano, VS Code, Zed, whatever you reach for – drops straight into your Elyra flow. It's a bit like switching from a sticky note to your actual desk, mid-sentence.</p><h2>Setting it up</h2><p>In your <code>.zshrc</code>, <code>.bashrc</code>, or whichever shell config you live in:</p><pre><code class="language-bash">export VISUAL="nvim"
# or
export EDITOR="code --wait"   # remember --wait for GUI editors!
</code></pre><p>That little <code>--wait</code> flag matters for GUI editors like VS Code, Zed, and Sublime. Without it, the command returns immediately, and Elyra thinks you're done before you've written a single word.</p><h2>A typical workflow</h2><ol><li><p>You start writing a prompt in Elyra</p></li><li><p>You notice this is going to be more than a couple of sentences</p></li><li><p>You hit <strong>Ctrl+G</strong></p></li><li><p>Your editor pops open with whatever you've already typed</p></li><li><p>You edit in peace – with all your usual shortcuts intact</p></li><li><p>You save (<code>:wq</code>, <code>Ctrl+S</code>, whatever your tool of choice wants)</p></li><li><p>You're back in Elyra with a nicely composed prompt</p></li><li><p>Enter, and off it goes</p></li></ol><h2>Customization</h2><p>Like everything else in Elyra, the keybinding can be swapped out. In your keybindings config, <code>app.editor.external</code> is the one that controls this – so if Ctrl+G is already claimed by your terminal for something else, just remap it to whatever feels right under your fingers.</p><h2>In short</h2><p>Ctrl+G in Elyra is one of those tiny things that sounds trivial until you've used it once. It's the bridge between the quick, conversational TUI and the full editor you already know how to drive. Prompt-writing stops being "type in a cramped field" and starts being "write the way you actually want to write."</p><p>Set <code>$VISUAL</code>, give it a try, and see if your prompts don't quietly become a little more thoughtful. ☕</p>