Overview
Claude Code works in any terminal without configuration, but a few terminal
behaviors (multiline input, notifications, tmux, and Vim keys) often need a small
tweak. This guide walks through the common fixes.
Multiline prompts and Shift+Enter
Enter submits your prompt. To add a newline without submitting, press Ctrl+J,
or type \ then Enter. Both work everywhere with no setup.
Shift+Enter for a newline works without setup in many terminals (Ghostty, Kitty,
iTerm2, WezTerm, Warp, Apple Terminal, Windows Terminal). In VS Code, Cursor,
Devin Desktop, Alacritty, and Zed, run /terminal-setup once to write the
binding. In gnome-terminal and JetBrains IDEs it is unavailable; use Ctrl+J or
\ then Enter.
Configure tmux
Inside tmux, Shift+Enter and desktop notifications break by default. Add the
following to ~/.tmux.conf, then run tmux source-file ~/.tmux.conf:
set -g allow-passthrough on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
allow-passthrough lets notifications and progress updates reach the outer
terminal; the extended-keys lines let tmux distinguish Shift+Enter from Enter.
Run /terminal-setup in the host terminal, not inside tmux.
Notifications
By default Claude Code sends a desktop notification only in Ghostty, Kitty, and
iTerm2. In other terminals, set preferredNotifChannel to "terminal_bell" in
settings, or configure a Notification hook for a custom sound:
{
"hooks": {
"Notification": [
{ "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }] }
]
}
}
Vim editor mode
Enable Vim-style editing in the prompt via /config -> Editor mode, or set
editorMode to "vim" in ~/.claude/settings.json. It supports a subset of
NORMAL and VISUAL motions (hjkl, v/V, d/c/y). Enter still submits in
INSERT mode; use o, O, or Ctrl+J to insert a newline.
Quick checklist
- Newline not working? Use
Ctrl+J or run /terminal-setup for your editor.
- On tmux? Add the three lines above to
~/.tmux.conf.
- No alert when Claude finishes? Set
preferredNotifChannel or add a
Notification hook.
- Want Vim keys? Set
editorMode: "vim".
- Display flickering? Switch to fullscreen rendering with
/tui fullscreen.
Source