Visual Studio Code on macOS Installation. Download Visual Studio Code for macOS.; Double-click on the downloaded archive to expand the contents. Drag Visual Studio Code.app to the Applications folder, making it available in the Launchpad. Visual Studio Code is free and available on your favorite platform – Linux, Mac OSX, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications. Visual Studio Code is an integrated development environment (IDE) that runs on Mac — as well as Linux and Windows (for some reason). But Visual Studio it is not. But Visual Studio it is not. I gave it a good three hours of testing: the install was easy, until I needed to update Mono.
Active5 months ago
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?
Gama1115.6k66 gold badges3333 silver badges5353 bronze badges
goggog3,12588 gold badges4242 silver badges9191 bronze badges
25 Answers
Shift+Alt+A
Here you can find all the keyboard 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.
Gama1115.6k66 gold badges3333 silver badges5353 bronze badges
saran3hsaran3h2,90711 gold badge1111 silver badges1919 bronze badges
- Select the lines you want to comment/uncomment
- Execute the command
editor.action.commentLine
(default shortcut on Windows:CTRL + /
)orexecute the commandeditor.action.addCommentLine
(default shortcut on Windows:ctrl+k ctrl+c
) respectivelyeditor.action.removeCommentLine
(default shortcut on Windows:ctrl+k ctrl+u
)
How to download ds emulator on mac. See the official doc : Key Bindings for Visual Studio Code
Sampath35.1k2121 gold badges160160 silver badges264264 bronze badges
WosiVisual Studio Code For Mac Unity
Wosi24.6k1111 gold badges5858 silver badges7070 bronze badges
The keyboard shortcut to comment multiple in Windows is shift+alt+A. https://fashionheavenly545.weebly.com/blog/hobbypower-esc-manual.
nbro6,2451010 gold badges5858 silver badges105105 bronze badges
Abdu RahimanAbdu Rahiman87911 gold badge66 silver badges1010 bronze badges
How to comment out multiline / single line in VS Code:
MacOS:
Recording studio app for mac. Shift + Option + A:
CMD + /: Download game the sims 3 seasons pc.
Windows:
Shift + Alt + A:
CTRL + /:
How to remap / change these shortcuts?
Windows: File > Preferences > Keyboard Shortcuts.
MacOS: Code > Preferences > Keyboard Shortcuts.
You can search through the list both by keybindings (key names) and command names.
Read:How to set shortcuts from another text editor (Sublime, Atom etc)?
Official docs:Key Bindings for Visual Studio Code
EduardEduard2,68211 gold badge1111 silver badges3333 bronze badges
nbro6,2451010 gold badges5858 silver badges105105 bronze badges
Ashutosh JhaAshutosh Jha5,84844 gold badges2828 silver badges5353 bronze badges
You can see all available keybindings on the official documentation.
Here's the relevant bit for osx: https://erkluo.weebly.com/blog/windows-vm-for-mac.
You will need to select the lines you want to comment first, then execute above shortcut, i.e.
jottrjottr⌘/
on osx Ctrl/
on Windows.![Code Code](/uploads/1/3/3/2/133273925/266163323.png)
1,78722 gold badges1919 silver badges3131 bronze badges
For my keyboard layout it's Ctrl + § for:
And Shift + Alt + A for:
J. Chomel6,4401313 gold badges3434 silver badges5454 bronze badges
SumpfkrautSumpfkraut
To comment multiple line on visual code use
To comment single line use
CENT1PEDE4,09188 gold badges4848 silver badges8989 bronze badges
KarthigaKarthiga
In
MacOS
comment out multi-lines in Visual Studio Code by keyboard shortcut:Option + Shift + A
Sajib KhanSajib Khan13.4k44 gold badges3535 silver badges5050 bronze badges
CTRL + SHIFT + A
for CSS multiline- Ubuntu 16
- VSCode Version 1.17.2
charlyRootcharlyRoot
RakeshRakesh
In the new version of VSCODE ( version 1.26.1)
- Go to File > preferences > Keyboard Shortcuts
- Search for
comment
Double click the existing shortcut 'keybinding` - And press the new keyboard shortcut in my case
ctrl + shfit + /
You can assign any shortcuts you want. Hope it helps.
Ragavan RajanRagavan Rajan
CTRL + SHIFT + AFor Red Hat,centos
- Select item
- then CTRL+SHIFT+A
RAHUL KUMARRAHUL KUMAR
Win10 with French / English Keyboard CTRL + / , ctrl+k+u and ctrl+k+l don't work.
Here's how it works:
/* */
SHIFT
+ ALT
+ A
//
CTRL
+ É
É key is next to right Shift.
ArsTVArsTV
For me it was
martin36martin36ctrl + '
(I am using a swedish layout for the keyboard). Hope that helps anyone.69022 gold badges99 silver badges1717 bronze badges
1.Select the text, Press Cntl + K, C to comment (Ctr+E+C )2.Move the cursor to the first line after the delimiter // and before the Code text.3.Press Alt + Shift and use arrow keys to make selection. . 4.Once the selection is done, press space bar to enter a single space.
meta alphameta alpha
visual studio 2017 we do a: Comment Selection
press Ctrl+K to get shortcut. press Ctrl+C to confirm http://visualstudioshortcuts.com/2017/
Joao VictorJoao Victor
You can view the existing shortcuts using the same steps as below. I find the default ones to be inconvenient, so I used the following process to change the IDE to use the '/' command seen in the comments.
You can customize the keyboard shortcuts by going int the 'Tools' menu and selecting 'Options'. Then select 'Keyboard' from the 'Environment' branch. From there you can bind the Edit.CommentSelection and Edit.UncommentSelection commands to whichever keyboard shortcuts you'd like.
AndyAndy
Visual studio 2012 for mac download. CTRL + / comment / uncomment multiple lines of code
ctrl+k+u for upper case latter
Photoshop for mac download free trial. ctrl+k+l for lower case latter
AashishAashish
Stephen Rauch33.1k1515 gold badges4444 silver badges6969 bronze badges
Julio Andres OrellanaJulio Andres Orellana
As of now (version 1.18.0), you can check keyboard shortcuts by going toFile > Preferences > Keyboard shortcuts. Here you can search for comment related shortcuts.
For users who are coming from
Sublime Text
or likes to have Ctrl+Shift+/, you can make the change from the above mentioned setting or simply install the Sublime Text Keymap
extension by Microsoft.im_tsmim_tsm
on Windows 10, Italian Keyboard, VSC 1.19.1:
Select lines that you want comment and press 'Ctrl + ù'
Pietro La GrottaPietro La Grotta
In windows you need to press
ctrl + /
in mac you can do Command ⌘ + /
to make multiple comment Then if you want to un-comment then select the lines again and then press
ctrl + /
(in windows) again Command ⌘ + /
(in mac).Prashant BarvePrashant Barve
You can find the shortcut in the Edit menu :
Edit > Toggle Block Comment => Shift-Alt-A
![Install Install](/uploads/1/3/3/2/133273925/617918157.png)
3,25644 gold badges3939 silver badges5454 bronze badges
If you are using VSCode in a linux environment, then you can comment multiple lines by either:
Download Visual Studio For Mac
Selecting a block of code => then, press Ctrl + Shift + A (Block commenting)
Or, selecting a block of code => then, press Ctrl + / (Single-line commenting applied to all selected lines)
Hope this helps.
sbr_amdsbr_amd
protected by eyllanescMay 8 '18 at 3:27
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?