Code Editor Keyboard Short Cuts For Mac

Mac keyboard shortcuts are shown here. Another good code editor on the Mac is MacRabbit - Espresso - The Web Editor. Another is Coda 2. You should try them out, to see how much catching up is required to move from 'text editor' to 'competitive HTML code editor'. As of now (version 1.18.0), you can check keyboard shortcuts by going to File > 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. Useful VS Code keyboard shortcuts. 23rd Feb 2018. Today, I want to share vs code shortcuts I use on a daily basis. First, I use a mac, so I’m only going to share the Mac keyboard shortcuts with you. If you’re on a Windows machine. Split Editor. When I code, I usually split the screen into two. You can bring up to three different.

  1. Pro Tools Keyboard Shortcuts For Mac
  2. Keyboard Shortcuts For Mac
  3. Code Editor Keyboard Shortcuts For Macbook Pro
  4. Mac Os Keyboard Shortcuts
  5. Keyboard Shortcuts For Mac Computers
  6. Keyboard Shortcuts For Apple
  7. Code Editor Keyboard Shortcuts For Mac
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?

MacGama11
15.6k6 gold badges33 silver badges53 bronze badges
goggog
3,1258 gold badges42 silver badges91 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.

Gama11
15.6k6 gold badges33 silver badges53 bronze badges
saran3hsaran3h
2,9071 gold badge11 silver badges19 bronze badges
  • Select the lines you want to comment/uncomment
  • Execute the command editor.action.commentLine (default shortcut on Windows: CTRL + /)

    or

    execute the command editor.action.addCommentLine (default shortcut on Windows: ctrl+k ctrl+c) respectively editor.action.removeCommentLine (default shortcut on Windows: ctrl+k ctrl+u)

See the official doc : Key Bindings for Visual Studio Code

Sampath
35.1k21 gold badges160 silver badges264 bronze badges
WosiWosi
24.6k11 gold badges58 silver badges70 bronze badges

The keyboard shortcut to comment multiple in Windows is shift+alt+A.

nbro
6,24510 gold badges58 silver badges105 bronze badges
Abdu RahimanAbdu Rahiman
8791 gold badge6 silver badges10 bronze badges

How to comment out multiline / single line in VS Code:

MacOS:

Shift + Option + A:

CMD + /:

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

EduardEduard
2,6821 gold badge11 silver badges33 bronze badges
nbro
6,24510 gold badges58 silver badges105 bronze badges
Ashutosh JhaAshutosh Jha
5,8484 gold badges28 silver badges53 bronze badges

You can see all available keybindings on the official documentation.

Here's the relevant bit for osx:

You will need to select the lines you want to comment first, then execute above shortcut, i.e. ⌘/ on osx Ctrl/ on Windows.

jottrjottr
1,7872 gold badges19 silver badges31 bronze badges

For my keyboard layout it's Ctrl + § for:

And Shift + Alt + A for:

J. Chomel
6,44013 gold badges34 silver badges54 bronze badges
SumpfkrautSumpfkraut

To comment multiple line on visual code use

To comment single line use

CENT1PEDE
4,0918 gold badges48 silver badges89 bronze badges
KarthigaKarthiga

In MacOScomment out multi-lines in Visual Studio Code by keyboard shortcut:

Option + Shift + A

Sajib KhanSajib Khan
13.4k4 gold badges35 silver badges50 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)

  1. Go to File > preferences > Keyboard Shortcuts
  2. Search for comment Double click the existing shortcut 'keybinding`
  3. 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 ctrl + ' (I am using a swedish layout for the keyboard). Hope that helps anyone.

martin36martin36
6902 gold badges9 silver badges17 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

CTRL + / comment / uncomment multiple lines of code

ctrl+k+u for upper case latter

ctrl+k+l for lower case latter

AashishAashish
Stephen Rauch
33.1k15 gold badges44 silver badges69 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

Pro Tools Keyboard Shortcuts For Mac

You can find the shortcut in the Edit menu :

Edit > Toggle Block Comment => Shift-Alt-A

Sylvain RodrigueSylvain RodrigueCode Editor Keyboard Short Cuts For Mac
3,2564 gold badges39 silver badges54 bronze badges

If you are using VSCode in a linux environment, then you can comment multiple lines by either:

Keyboard Shortcuts 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?

Not the answer you're looking for? Browse other questions tagged visual-studio-code or ask your own question.

Active2 years, 2 months ago

I need a free code editor for MacOS.I'm currently using Komodo Edit 10, which is the closest to what I need but it crashes too much to be used seriously.

Here's what I'd like :

  • Light (not a full IDE, I don't care about FTP support etc... just want fast loading)
  • Support of common webdev languages (PHP, JS, html/css...)
  • Basic autocompletion
  • Emmet support
  • A view of ALL methods and properties if the file is a PHP or JS class (currently using NST plugin for komodo : exactly what I need but now dead and buggy)
  • Smart shortcuts and custom shortcuts. The editor with the best shortcuts management to me is notepad++ for windows. I'd mostly like the following :
    • Line / Block commenting/uncommenting with the SAME shortcut. Editors often use a different shortcut to comment a selection or just a line and this is just stupid.
    • Line swapping. I didn't think it would be so hard to find a simple line swap to invert a line with the line before. Without moving the custor, obviously
    • A fast EMMET selector expansion. Emmets plugins for komodo are ridiculous, it's faster to type everything myself than to wait for it to expand a simple selector...

I thinks that's all.

I tried a lot of editors and I can't find this class view thing !

FLXFLX

3 Answers

Have you tried Atom or Sublime text? Atom is free and Sublime has a free trial that appears to be endless. Both are very configurable and are can be used for many different computer languages. A web development specific app, Brackets by Adobe is free and very nice. I use it myself. All 3 apps mentioned have plugins or extensions for different enhancements. Brackets is free.

Another code editor app I tested recently is Visual Studio Code. It too is free. The more traditional type editors, Text Wrangler, Emacs and Vim are free options. Emacs and Vim have a long learning curve and are keyboard focused as opposed to using a mouse. There is a large community of users for both emacs and Vim. The users of these two are adamant about their editors. Both are highly customizable.

jmhjmh

Code Editor Keyboard Shortcuts For Macbook Pro

6111 gold badge3 silver badges10 bronze badges

Check out Geany - Free/Open, available for Linux/OS X/Windows, same syntax highlighting as Notepad++, configurable custom keyboard shortcuts, multiple files, terminal window, can tie to your compiler/etc and actually build from within the editor.

In fact, it is more of a super light weight IDE than a plain text editor.

But I think it rocks.

ivanivanivanivan

Mac Os Keyboard Shortcuts

CudaText editor is suitable, it is free/ open source.Items which mentioned, almost all present.

Keyboard Shortcuts For Mac Computers

  • Basic auto-completion is done for HTML/CSS, while for other syntaxes a plugin needed (exists for: JS, and Python).
  • Emmet: plugin works, but with NodeJS installed (must install Node on Mac).
  • Shortcuts: are configurable via F1, then F9.
  • View of all methods: present via Code Tree panel on left.

Keyboard Shortcuts For Apple

RProgramRProgram

Code Editor Keyboard Shortcuts For Mac

Not the answer you're looking for? Browse other questions tagged osxtext-editorside or ask your own question.