visual-studio-codekeyboard-shortcuts

How can I comment multiple lines in Visual Studio Code?


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?


Solution

  • First, select the lines you want to comment/uncomment (Ctrl + L is convenient to select a few lines)

    Then:

    See the official documentation: Key Bindings for Visual Studio Code