# Ctrl+G Shortcut

> The key that lets you write your prompt in your own editor.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** Ctrl+G, open prompt in editor, Ctrl+X Ctrl+E

## Think of it like

It is like going from a small note to a big sheet of paper.

## Definition

Ctrl+G is the Claude Code shortcut that opens your prompt in your own text editor. You write there, save and close, and the text comes back to the prompt. Ctrl+X Ctrl+E does the same. A /config option can put Claude's last reply above your text as comments, and Claude Code strips them when you save.

## Example

Leo has a long bug report to paste and edit. He presses Ctrl+G and writes it in his editor.

## Why it matters

Long prompts are easier to write in an editor you know.

## Common mistake

Having no editor set and seeing the wrong one open. Set your EDITOR first.

## Three principles

- **Your editor.** For the prompt.
- **Save to send back.** Close the file.
- **Ctrl+X Ctrl+E too.** Same job.

## Related terms

- [Ctrl+S Shortcut](https://learn.benibix.com/term/ai/ctrl-s-shortcut)
- [/config Command](https://learn.benibix.com/term/ai/config-command)
- [keybindings.json](https://learn.benibix.com/term/ai/keybindings-json-file)

## Taught in

- [Claude Code Prompt Shortcuts](https://learn.benibix.com/learn/ai-claude-code/claude-code-prompt-shortcuts): Claude Code, 4/16

---

Source: https://learn.benibix.com/term/ai/ctrl-g-shortcut
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
