Multiline Input - Claude Code
Shift+Enter, Option+Enter, or backslash+Enter for multi-line prompts.
Multiline input lets you compose long prompts without hitting submit on every line break.
What it does
Shift+Enter, Option+Enter, or a trailing backslash followed by Enter all insert a newline into the prompt buffer instead of sending it. You can paste multi-line code blocks, write step-by-step instructions, or draft a structured prompt in place. Regular Enter still submits when you're ready.
When to use it
- Pasting code samples, logs, or error messages into a prompt.
- Writing a structured brief with sections and bullets.
- Composing a prompt that mixes prose with file paths or commands.
- Any time your prompt is longer than one terminal line.
Gotchas
- Some terminals don't distinguish Shift+Enter from Enter. Use backslash + Enter as a universal fallback.
- Bracketed paste mode affects how multi-line pastes are interpreted - enable it in your terminal config.
- Vim mode has its own multiline behavior. Use
ofrom normal mode to open a new line cleanly.
Official docs: https://code.claude.com/docs/en/interactive-mode.md#multiline-input
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
Was this helpful?




