

Ctrl + / (the slash key) to comment and uncomment lines of code on Windows.This is probably the most useful shortcut in here. Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing Options, Keep in Dock. Open VS Code from the Applications folder, by double clicking the icon. This is the other main usage of comments. Drag Visual Studio Code.app to the Applications folder, making it available in the macOS Launchpad. On Windows, the shortcut is: CTRL + / On Mac, the shortcut is: Command + / The VSCode comment shortcut Mac is very similar to the Windows version. Then, use the VS Code comment shortcut that corresponds to your platform below. While this requires some initial investment in learning how it works in order to take full advantage of its. First, place your cursor where you'd like to add the comment. Looking for an answer to the question: How do you comment multiple lines of code in visual studio.
How to comment the code in visual studio code for mac for mac#
Command + K then Command + U if you’re on a Mac As with all vi-like editors, Vim provides a modal paradigm for text editing and processing that provides a rich syntax and semantic model for composing succinct, powerful commands. Comment out code - Visual Studio for Mac Microsoft.Ctrl + K then Ctrl + U if you’re on Windows.To uncomment a block of code, use your mouse to select it and then use the key combination: Command + K then press Command + C if you’re on a Mac.Ctrl + K then press Ctrl + C if you’re using Windows.


AdvertisementsĪll you need to do is select that code block with your mouse, then press the following key combination: Advertisements If you are using VS Code (Visual Studio Code) to develop your React app then you can easily and quickly make comments by using keyboard shortcuts. This article shows you a few ways to comment out a single line or a block of code in React and JSX.
