brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: /terminal-setup makes Shift+Enter add a new line in Claude Code inside VS Code

Terminal
~/tips/tip-claude-code-terminal-setup

/terminal-setup

Adds a Shift+Enter newline binding to terminals where Shift+Enter sends your prompt instead.

Few things annoy me more than pressing Shift+Enter for a second line and watching half a prompt fly off to Claude. Whether Shift+Enter works in Claude Code depends on your terminal, and in some of them one slash command fixes it.

In VS Code, Cursor, Devin Desktop, Zed and Alacritty before 0.16, run this once inside Claude Code:

/terminal-setup

It writes a Shift+Enter keybinding into that terminal’s own configuration. The first time you see a line like Installed VSCode terminal Shift+Enter key binding; when a binding already exists it tells you so and changes nothing. Zed gets a backup copy of keymap.json before the binding is merged in.

Plenty of terminals don’t need it. Ghostty, Kitty, iTerm2, WezTerm, Warp and Windows Terminal 1.25 or newer handle Shift+Enter out of the box, so on a Mac with iTerm2 or Ghostty there’s nothing to set up. gnome-terminal, older Windows Terminal versions and JetBrains IDEs can’t do it at all. For those, two keys work everywhere without any setup: Ctrl+J, or a \ followed by Enter. Worth learning either way.

Read the fine print before you run it in VS Code, Cursor or Devin Desktop. It also changes two editor settings: terminal.integrated.gpuAcceleration goes to "off" to prevent garbled text, and the mouse wheel scroll sensitivity is adjusted. If you liked GPU acceleration, set it back to "auto" and reload the window. Run the command straight in the host terminal too, not inside tmux or screen, because it has to write to the host terminal’s config.

On a Mac the same command does other jobs. In Apple Terminal it turns off the audible bell, and on macOS 26 and earlier it also switches on “Use Option as Meta Key”. In iTerm2 it lets terminal apps access the clipboard, so /copy works after you restart iTerm2.

Further reading: Enter multiline prompts (Claude Code terminal configuration), Claude Code commands

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link