


If you like this article, you may also want to check out our posts about other nifty little features such as duplicate line or automatic indent in Visual Studio Code. Keyboard Shortcut Keys for Visual Studio 2008, 2010, 2012 Ctrl-K, Ctrl-C Marks the current line or selected lines of code as a comment, using the correct. Please do note that if we try to set the new hotkey to something already assigned to other actions, there will be a warning before you proceed. We have to double click somewhere inside Toggle Block Comment section, then press the new hotkey, followed by the Enter key to commit changes. Let’s say we want to modify Toggle Block Comment keyboard shortcut from Shift + Alt + A to Shift + L. You can also enter "toggle block" into the search box to quickly jump to the section you want. For a comprehensive list of command shortcuts and a printable keyboard. These shortcuts include keyboard and mouse shortcuts as well as text you can enter to help accomplish a task more easily. You can navigate in Visual Studio more easily by using the shortcuts in this article. This will open a new Keyboard Shortcuts tab which lists all available commands along with their assigned hotkey so you can easily change them.įor our purpose, scroll until you see Toggle Block Comment. Applies to: Visual Studio Visual Studio for Mac Visual Studio Code. ( Code > Preferences > Keyboard Shortcuts on macOS builds). Open Visual Studio Code and go to File > Preferences > Keyboard Shortcuts. If the default keyboard shortcut to convert lines into comment block doesn’t fit your workflow, you can always change it. Change Block Comment keyboard shortcut in VSCode Press Shift + Alt + A hotkey to convert the selected lines into comment block.Select the lines that you want to turn into a comment block.Open a text file with Visual Studio Code.2 Change Block Comment keyboard shortcut in VSCode Convert multiple lines into a comment block in Visual Studio Code
