Skip to content

Commit b0c0542

Browse files
docs(shortcuts): add line-editing keys (clear/kill/word-jump)
Expand the Editing section with Ctrl+A/E, Option+arrows, Ctrl+W, Ctrl+U, Ctrl+K, and a tip that Ctrl+C wipes the whole prompt at once (no char-by-char backspace; terminal Cmd+A selects scrollback, not the input). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ee9b054 commit b0c0542

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/reference/keyboard-shortcuts.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,22 @@ Claude Code's interactive REPL is driven by keyboard shortcuts. This page groups
2222

2323
## Editing
2424

25+
Move and delete fast — no arrow-keying character by character:
26+
2527
| Shortcut | Action |
2628
| --- | --- |
29+
| `Ctrl+A` / `Ctrl+E` | Jump to the start / end of the line |
30+
| `Option/Alt+←` / `` | Jump backward / forward one word |
31+
| `Ctrl+W` | Delete the previous word |
32+
| `Ctrl+U` | Delete from the cursor to the start of the line |
33+
| `Ctrl+K` | Delete from the cursor to the end of the line |
2734
| `Ctrl+G` | Edit the current prompt or plan in `$EDITOR` |
2835

2936
Vim-style editing is available via `/config`**Editor mode**.
3037

38+
> [!TIP]
39+
> Changed your mind about a long prompt? Press `Ctrl+C` **once** to wipe the whole input instantly — no backspacing letter by letter (a second press exits Claude Code). A terminal's `Cmd+A` selects the scrollback for copying, not the prompt text, so use these kill-line shortcuts to clear it.
40+
3141
## macOS Option keys
3242

3343
| Shortcut | Action |

0 commit comments

Comments
 (0)