How to comment multiple lines in Visual Studio Code?

gog picture gog · Dec 16, 2015 · Viewed 699.5k times · Source

I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code.

Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, how to do it?

Answer

saran3h picture saran3h · Apr 10, 2018

Shift+Alt+A

Here you can find all the keyboard shortcuts.

All VSCode Shortcuts

PS: I prefer Ctrl+Shift+/ for toggling block comments because Ctrl+/ is shortcut for toggling line comments so it's naturally easier to remember. To do so, just click on the settings icon in the bottom left of the screen and click 'Keyboard Shortcuts' and find "toggle block...". Then click and enter your desired combination.