Terminal Shortcuts for Faster Prompting
Small terminal shortcuts make long Claude Code sessions less tedious.
Useful shortcuts
Section titled “Useful shortcuts”| Shortcut | Action |
|---|---|
Option+B / Option+F |
Move back or forward one word. |
Ctrl+A |
Jump to the start of the line. |
Ctrl+E |
Jump to the end of the line. |
Option+Delete |
Delete the previous word. |
Ctrl+L |
Clear the screen and keep the conversation. |
On macOS, the Option word shortcuts require Option to be configured as Meta in your terminal. Many terminals also map Option+Arrow to word movement, but that depends on the terminal and is not a documented Claude Code binding.
Why it matters
Section titled “Why it matters”Prompting is editing. Faster line editing makes it easier to revise instructions before sending them.
Ctrl+L only clears the screen. It does not clear Claude Code’s conversation context, and you can scroll back up to read the earlier messages. Use /clear to reset context. Before v2.1.260, Ctrl+L redrew the screen without clearing it.
Cmd+K does the same only when your terminal passes it through. iTerm2 and Terminal.app handle Cmd+K themselves, and Claude Code redraws the conversation instead of clearing it, so use Ctrl+L there.