Skip to content
,

Claude Code Terminal Setup (2026): Shift+Enter, Notifications, tmux and Vim Mode

6–10 minutes
Woman on a rooftop terrace holding a tablet with a TERMINAL SETUP card, hook fix Shift+Enter

Claude Code works in any terminal, but a few small things trip people up on day one. Shift+Enter sends the message instead of adding a new line. Nothing tells you when a long task finishes. Option-key shortcuts do nothing on a Mac. The screen flickers during long replies.

This guide fixes all of them.

You will learn how to type multiline prompts in every terminal, run /terminal-setup, get a bell or desktop notification when Claude is done, configure tmux, match the color theme, switch to flicker-free fullscreen mode, paste large content and turn on Vim keys. It follows Anthropic’s Claude Code documentation as of December 2026.

TL;DR

  • New line anywhere: Ctrl+J, or type \ then Enter.
  • Shift+Enter in VS Code, Cursor or Zed: run /terminal-setup once.
  • Notifications: "preferredNotifChannel": "terminal_bell" or a Notification hook.
  • tmux: add allow-passthrough and extended-keys lines to ~/.tmux.conf.
  • Flicker: /tui fullscreen or CLAUDE_CODE_NO_FLICKER=1.
  • Vim keys: /config > Editor mode > vim.

Fix Shift+Enter: Multiline Prompts

Enter submits your message. Two ways to add a line break work in every terminal with no setup:

  • Ctrl+J
  • Type \ and then press Enter

Shift+Enter works in most terminals, but support varies:

Terminal Shift+Enter for a new line
Ghostty, Kitty, iTerm2, WezTerm, Warp, Windows Terminal 1.25+ Works with no setup
foot, Alacritty 0.16+ and other kitty-protocol terminals Works with no setup (Claude Code v2.1.269+)
VS Code, Cursor, Devin Desktop, Alacritty before 0.16, Zed Run /terminal-setup once
gnome-terminal, Windows Terminal before 1.25, JetBrains IDEs Not available; use Ctrl+J or \ then Enter
  1. Open Claude Code in the host terminal, not inside tmux or screen, because the command writes to the host terminal’s config.
  2. Run /terminal-setup.
  3. Look for the confirmation, such as Installed VSCode terminal Shift+Enter key binding. If it says the binding is already configured, nothing changed.
  4. Press Shift+Enter in a prompt to test.

Want Enter to add a new line and Shift+Enter to send? Map the chat:newline and chat:submit actions in your keybindings file.

What /terminal-setup Changes

Terminal Change
VS Code, Cursor, Devin Desktop Adds the Shift+Enter binding; sets terminal.integrated.gpuAcceleration to "off" to stop garbled text; tunes scroll sensitivity for fullscreen mode
Zed Merges the binding into keymap.json, making a .bak backup first
Alacritty before 0.16 Adds the Shift+Enter binding
Apple Terminal Turns off the audible bell and, on macOS 26 and earlier, enables Option as Meta
iTerm2 Lets apps access the clipboard so /copy works

To undo the VS Code GPU change, set terminal.integrated.gpuAcceleration back to "auto" and reload the window. Running Claude Code inside VS Code? Our Claude Code VS Code extension guide covers the graphical panel too.

Enable Option Key Shortcuts on macOS

Some shortcuts use Option, such as Option+Enter for a new line or Option+P to switch models. Most Mac terminals do not send Option as a modifier by default.

  • Apple Terminal: Settings > Profiles > Keyboard, check Use Option as Meta Key.
  • iTerm2: Settings > Profiles > Keys > General, set Left and Right Option key to Esc+.
  • VS Code: add "terminal.integrated.macOptionIsMeta": true to settings.
  • Ghostty, Kitty and others: look for an Option-as-Alt setting in the config file.

All shortcuts are listed in our Claude Code commands cheat sheet.

Get Notified When Claude Finishes

When Claude finishes or waits for a permission answer while you seem to be away, it fires a notification event. What you get by default depends on the terminal:

  • Ghostty, Kitty, iTerm2: a desktop notification (iTerm2 needs its alerts turned on).
  • Apple Terminal: no sound; a silent bell only when Audible bell is off in the profile.
  • Other terminals: nothing.

Option 1: force a terminal bell

{
  "preferredNotifChannel": "terminal_bell"
}

Put it in ~/.claude/settings.json. In Apple Terminal also enable Audible bell under Settings > Profiles > Advanced.

Option 2: iTerm2 desktop alerts

  1. Open Settings > Profiles > Terminal.
  2. Check Notification Center Alerts.
  3. Click Filter Alerts and enable Send escape sequence-generated alerts.
  4. Allow notifications for iTerm2 in macOS settings.

Option 3: play a sound with a hook

{
  "hooks": {
    "Notification": [
      {
        "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }]
      }
    ]
  }
}

Hooks run in any terminal, including Warp and the VS Code terminal, alongside the built-in notification. Linux and Windows examples are in our Claude Code hooks guide.

Configure tmux

Inside tmux, Shift+Enter submits and desktop notifications do not reach the outer terminal. Add these lines to ~/.tmux.conf:

set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
  1. Apply them: tmux source-file ~/.tmux.conf
  2. For Shift+Enter: detach, attach again and restart Claude Code.
  3. For notifications: keep allow-passthrough and restart Claude Code. Only a visible pane sends them.

On tmux older than 3.3 there is no allow-passthrough; set preferredNotifChannel to "iterm2", "kitty" or "ghostty" instead.

Match the Color Theme

Run /theme or open the theme picker in /config. The options include:

  • auto, which follows your terminal’s light or dark background.
  • Light and dark variants.
  • Colorblind-friendly (daltonized) themes.
  • ANSI themes that use your terminal’s own palette.
  • Custom themes from ~/.claude/themes/; choose New custom theme… to make one.

Claude Code does not change the terminal’s own color scheme. To show the model, branch or context use at the bottom, add a custom status line.

Stop Flicker With Fullscreen Mode

If the display flickers or the scroll position jumps while Claude works, switch to fullscreen rendering. You then scroll with the mouse or PageUp inside Claude Code instead of the terminal’s scrollback.

/tui fullscreen

This saves the preference and relaunches your conversation intact. Or set the variable before launch:

# bash or zsh
CLAUDE_CODE_NO_FLICKER=1 claude

# PowerShell
$env:CLAUDE_CODE_NO_FLICKER = "1"; claude

If flicker is your only problem and your terminal supports synchronized output but is not detected (such as Emacs eat), set CLAUDE_CODE_FORCE_SYNC_OUTPUT=1 instead. In a very wide terminal, maxProseWidth wraps prose at a set column count.

Paste Large Content

Paste more than 800 characters or three lines and Claude Code collapses it to a placeholder like [Pasted text #1 +120 lines]. The full text is still sent.

  • Very large input such as whole files or long logs: write it to a file and ask Claude to read it. The transcript stays readable and uses less context.
  • Deleted a placeholder by accident? Press Ctrl+Y to paste it back.
  • Recalled prompts resend the pasted text from ~/.claude/paste-cache/, until it ages out.
  • VS Code terminal can drop characters from very large pastes, so use a file there.

Use Vim Keybindings

  1. Run /config and set Editor mode to vim, or add "editorMode": "vim" to ~/.claude/settings.json.
  2. Use NORMAL and VISUAL motions such as hjkl, v/V and d/c/y with text objects.
  3. Insert new lines with o, O or Ctrl+J. Enter still submits in INSERT mode.
  4. Map jj to Escape with vimInsertModeRemaps in user settings.

The old /vim command was removed in v2.1.92.

Windows Fixes

  • Backspace deletes a whole word: your terminal sends ^H. Set CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0.
  • Shift+Enter submits: update to Windows Terminal 1.25 or later, or use Ctrl+J.
  • Git Bash not found: set CLAUDE_CODE_GIT_BASH_PATH to your bash.exe.

Setting these variables is explained in our Claude Code environment variables guide.

Recommended Setup by Terminal

You use Do this once
iTerm2 Set Option keys to Esc+, enable escape-sequence alerts, run /terminal-setup for clipboard access
Apple Terminal Use Option as Meta Key, set preferredNotifChannel to "terminal_bell" and turn on Audible bell
VS Code or Cursor terminal Run /terminal-setup, add macOptionIsMeta on Mac, add a Notification hook for alerts
Ghostty, Kitty, WezTerm Nothing for Shift+Enter; check the Option-as-Alt setting on Mac
Windows Terminal Update to 1.25 or later for Shift+Enter; set the Backspace variable if needed
tmux on any terminal Add the four ~/.tmux.conf lines and restart Claude Code

After these one-time changes, most people never need to touch terminal settings again. If you only want one change, make it notifications: they let you switch to other work while a long task runs.

Troubleshooting

/terminal-setup did nothing in tmux

Run it in the host terminal outside tmux, then add the tmux lines above.

Zed keymap was not changed

If Claude Code cannot parse, back up or verify the keymap, or it is a symlink, it prints the block for you to add by hand.

Notifications never appear

Check that the terminal app has notification permission in your OS, and that tmux passthrough is on.

Garbled text in the VS Code terminal

Run /terminal-setup, which turns off GPU acceleration for the integrated terminal.

For crashes and install errors, see Claude Code not working.

FAQ

How do I add a new line in Claude Code?

Press Ctrl+J or type \ then Enter. Shift+Enter works in most modern terminals.

Why does Shift+Enter send my message?

Your terminal does not send a distinct Shift+Enter. Run /terminal-setup in VS Code, Cursor, Zed or older Alacritty; in gnome-terminal or JetBrains use Ctrl+J.

How do I get a sound when Claude Code finishes?

Set preferredNotifChannel to "terminal_bell" or add a Notification hook.

How do I stop Claude Code flickering?

Run /tui fullscreen or launch with CLAUDE_CODE_NO_FLICKER=1.

Does Claude Code support Vim mode?

Yes, set Editor mode to vim in /config.

Can I change the Claude Code theme?

Yes, with /theme, including an auto option and custom themes.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman on a rooftop terrace holding a tablet with a TERMINAL SETUP card, hook fix Shift+Enter