claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] /terminal-setup command doesn't work in VSCode

Open softwarerockstar opened this issue 6 months ago • 1 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [X ] Other: Claude Code in VSCode
  • Claude CLI version: 1.0.2 (Claude Code)
  • Operating System: Windows 11
  • Terminal: WSL

Bug Description

  • /terminal-setup command doesn't configure Shift+Enter for new lines
  • Shift+Enter still sends messages instead of creating new lines

Steps to Reproduce

  1. In VSCode open a new WSL Terminal
  2. Run claude
  3. In Claude Code enter /terminal-setup
  4. Type some text followed by Shift+Enter

Expected Behavior

Shift+Enter should create new line

Actual Behavior

The text you typed is sent, just like if you hit the Enter key

Additional Context

/terminal-setup command is documented here:

https://docs.anthropic.com/en/docs/claude-code/cli-usage

softwarerockstar avatar May 23 '25 04:05 softwarerockstar

Also having this issue with Claude Code 1.0.22

Matthew-Herman avatar Jun 13 '25 06:06 Matthew-Herman

Same issue (VS Code WSL: Ubuntu-24-04).

danielhont avatar Jul 02 '25 08:07 danielhont

man i'm still getting this on 1.0.102 (Claude Code) :(

rublev avatar Sep 03 '25 18:09 rublev

This is now also the case on Cursor. The interesting thing is that it used to be working fine before. Not sure what changed.

ahmedebid avatar Sep 16 '25 15:09 ahmedebid

Yep. 1.0.113 made plan mode go away on shift-tab now 1.0.115 took away shift-enter for new line 😕

briandonahue avatar Sep 16 '25 19:09 briandonahue

Update: this seems to primarily be an issue when you open Claude Code with the Cursor (haven't tested in VS) extension button at top right. If you just launch claude from the in-app terminal, shift-enter works for me. I updated the key binding based on this comment to get rid of the extra \ but either works when launched in a regular terminal. I wonder if the extension terminal is no longer considered terminalFocus so the key binding is not executing. So - could be an extension bug and not a direct Claude Code bug.

briandonahue avatar Sep 16 '25 19:09 briandonahue

Has anyone actually gotten this to work on Windows with WSL or WSL2 in VSCODE and/or CURSOR?

I'm on Windows 11 WSL2 with Ubuntu and Cursor and Shift+Enter worked for months until the latest update. I've tried all the suggestions across loads of these issues pages and none of the adjusted keybindings have worked.

For example, this was highlighted as a fix in several places but place in either keybindings.json (windows local or ubuntu locall) or BOTH none of them work:

[
  {
    "key": "shift+enter",
    "command": "workbench.action.terminal.sendSequence",
    "args": { "text": "\u001B\u000A" },
    "when": "terminalFocus"
  }
]

redzonej avatar Sep 19 '25 12:09 redzonej

FYI discussion on cursor forums here:

https://forum.cursor.com/t/shift-enter-not-working-in-the-latest-version-of-cursor-ide-claude-code-extension/133740

redzonej avatar Sep 19 '25 13:09 redzonej

What a piece of garbage. Back to neovim it is. Trash all across the board!

rublev avatar Sep 20 '25 02:09 rublev

Has anyone actually gotten this to work on Windows with WSL or WSL2 in VSCODE and/or CURSOR?

@redzonej Per my comment above, this seems to do with the context of the Claude panel that is opened using the Claude key command or button in Cursor not being an actual terminal so the binding doesn't work. I tried a few things to figure out a way to get it to work but came up empty (definitely not an expert with VS Code context/binding stuff).

A workaround is to open a terminal, drag it to the same location as your Claude panel, launch claude and it will still connect to the IDE (you can always run /ide if not) and work the same way. A couple extra steps but at least you don't have to deal with constantly accidentally triggering prompts when you didn't mean to 😄

briandonahue avatar Sep 24 '25 12:09 briandonahue