Shortcut

Visual Studio Code Toggle Block Comment Shortcut

The Visual Studio Code shortcut to toggle block comment is Shift + Alt + A on Windows. On Mac, press Shift + Option + A.

Quick Answer

Windows
Shift+Alt+A
Mac
Shift+Option+A
Web
Not confirmed yet
Visual Studio CodeShortcut

Toggle Block Comment

Windows
Shift+Alt+A

Comments or uncomments the selected block.

Learn More

How to toggle block comment in Visual Studio Code

  1. Open Visual Studio Code and go to where you want to toggle block comment.
  2. Press Shift + Alt + A on Windows or Shift + Option + A on Mac.

Visual Studio Code Toggle Block Comment Shortcut for Windows

Press Shift + Alt + A.

Visual Studio Code Toggle Block Comment Shortcut for Mac

Press Shift + Option + A.

Visual Studio Code Toggle Block Comment Shortcut for Visual Studio Code Web

We haven't confirmed a Visual Studio Code Web shortcut for this yet.

Related Keyboard Shortcuts

Frequently asked questions

What is the Visual Studio Code toggle block comment shortcut?

On Windows, press Shift + Alt + A. On a Mac, press Shift + Option + A.

Is there a Mac shortcut to toggle block comment in Visual Studio Code?

Yes: Shift + Option + A.

Does it work in Visual Studio Code for the web?

We haven't confirmed a web version shortcut for this yet.

Official source · How we verify