Mac Visual Code Studio Shortcut For Commenting Out

“CTR+K,C” for commenting “CTR+K,U” for uncommenting shortcuts are NOT useful, easier to click a button on a toolbar instead. Every developer comment / uncomment pieces of code quite often. News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine. Remember to check out /r/unity2D for any 2D specific questions and conversation! Download Latest Unity. Rules and Wiki. Please refer to our Wiki before posting! This keyboard shortcut is new in Visual Studio 2013. If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you've selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down.

↑ Shift + ⌘ Cmd + P then F1

F1 Show Command Palette

⌘ Cmd + P

Quick Open, Go to File

↑ Shift + ⌘ Cmd + N

New window/instance

⌘ Cmd + W

Close window/instance

⌘ Cmd + ,

User Settings

⌘ Cmd + K then ⌘ Cmd + S

Keyboard Shortcuts

⌘ Cmd + X

Cut line (empty selection)

⌘ Cmd + C

Copy line (empty selection)

⌥ Option + ↑ ↓

Move line up/down

↑ Shift + ⌥ Option + ↑ ↓

Copy line up / down

⌘ Cmd + ⤶ Enter

Insert line below

↑ Shift + ⌘ Cmd + ⤶ Enter

Insert line above

↑ Shift + ⌘ Cmd +

Jump to matching bracket

⌘ Cmd + ]

Indent/outdent line

or ⌘ Cmd + [
Home

Go to beginning of line

End

Go to end of line

⌘ Cmd +

Go to beginning of file

⌘ Cmd +

Go to end of file

Ctrl + ↑ ↓

Scroll line up/down

Control + Page Up

Scroll page up

Control + Page Down

Scroll page down

⌥ Option + ⌘ Cmd + [

Fold (collapse) region

⌥ Option + ⌘ Cmd + ]

Unfold (uncollapse) region

⌘ Cmd + K then ⌘ Cmd + [

Fold (collapse) all subregions

⌘ Cmd + K then ⌘ Cmd + ]

Unfold (uncollapse) all subregions

⌘ Cmd + K then ⌘ Cmd + 0

Fold (collapse) all regions

⌘ Cmd + K then ⌘ Cmd + J

Unfold (uncollapse) all regions

⌘ Cmd + K then ⌘ Cmd + C

Add line comment

⌘ Cmd + K then ⌘ Cmd + U

Remove line comment

⌘ Cmd + /

Toggle line comment

↑ Shift + ⌥ Option + A

Toggle block comment

⌥ Option + Z

Toggle word wrap

⌘ Cmd + T

Show all symbols

Control + G

Go to line

⌘ Cmd + P

Go to file

↑ Shift + ⌘ Cmd + O

Go to symbol

↑ Shift + ⌘ Cmd + M

Show Problems panel

F8

Go to next error or warning

↑ Shift + F8

Go to previous error or warning

Ctrl + ↑ Shift + ⭾ Tab

Navigate editor group history

Ctrl + -

Go back

Ctrl + ↑ Shift + -

Go forward

Ctrl + ↑ Shift + M

Toggle Tab moves focus

⌘ Cmd + F

Find

⌥ Option + ⌘ Cmd + F

Replace

⌘ Cmd + G

Find next

↑ Shift + ⌘ Cmd + G

Find previous

⌥ Option + ⤶ Enter

Select all occurences of Find match

⌘ Cmd + D

Add selection to next Find match

⌘ Cmd + K then ⌘ Cmd + D

Move last selection to next Find match

⌥ Option +

Insert cursor

⌥ Option + ⌘ Cmd + ↑ ↓

Insert cursor above / below

⌘ Cmd + U

Undo last cursor operation

↑ Shift + ⌥ Option + I

Insert cursor at end of each line selected

⌘ Cmd + I

Select current line

↑ Shift + ⌘ Cmd + L

Select all occurrences of current selection

⌘ Cmd + F2

Select all occurrences of current word

Ctrl + ↑ Shift + ⌘ Cmd +

Expand selection

Ctrl + ↑ Shift + ⌘ Cmd +

Shrink selection

↑ Shift + ⌥ Option +

Column (box) selection

↑ Shift + ⌥ Option + ⌘ Cmd + ← →

Column (box) selection left/right

Shift + Option + Command + Page Up

Column (box) selection page up

Shift + Option + Command + Page Down

Column (box) selection page down

Visual studio shortcut for copy line
Ctrl + Space

Trigger suggestion

↑ Shift + ⌘ Cmd + Space

Trigger parameter hints

↑ Shift + ⌥ Option + F

Format document

⌘ Cmd + K then ⌘ Cmd + F

Format selection

F12

Go to Definition

⌥ Option + F12

Peek Definition

⌘ Cmd + K then F12

12 Open Definition to the side

⌘ Cmd + .

Quick Fix

↑ Shift + F12

Show References

F2

Rename Symbol

⌘ Cmd + K then ⌘ Cmd + X

Trim trailing whitespace

⌘ Cmd + K then M

M Change file language

⌘ Cmd + W

Close editor

⌘ Cmd + K then F

F Close folder

⌘ Cmd +

Split editor

⌘ Cmd + 1

Focus into first group

⌘ Cmd + 2

Focus into second group

⌘ Cmd + 3

Focus into third group

⌘ Cmd + K then ⌘ Cmd + ← →

Focus into previous/next editor group

⌘ Cmd + K then ↑ Shift + ⌘ Cmd +

Move editor left

⌘ Cmd + K then ↑ Shift + ⌘ Cmd +

Move editor right

⌘ Cmd + K then ← →

ht Move active editor group

Code
⌘ Cmd + N

New File

⌘ Cmd + O

Open File

⌘ Cmd + S

Save

↑ Shift + ⌘ Cmd + S

Save As

⌥ Option + ⌘ Cmd + S

Save All

⌘ Cmd + W

Close

⌘ Cmd + K then ⌘ Cmd + W

Close All

Ctrl + ↑ Shift + T

Reopen closed editor

⌘ Cmd + K then ⤶ Enter

er Keep preview mode editor open

Control + ⭾ Tab

Open next

Control + ↑ Shift + ⭾ Tab

Open previous

⌘ Cmd + K then P

P Copy path of active file

⌘ Cmd + K then R

R Reveal active file in Explorer

⌘ Cmd + K then O

O Show active file in new window/instance

Control + ⌘ Cmd + F

Toggle full screen

⌥ Option + ⌘ Cmd + 1

Toggle editor layout (horizontal/vertical)

⌘ Cmd + =

Zoom in

↑ Shift + ⌘ Cmd + -

Zoom out

⌘ Cmd + B

Toggle Sidebar visibility

↑ Shift + ⌘ Cmd + E

Show Explorer / Toggle focus

↑ Shift + ⌘ Cmd + F

Show Search

Control + ↑ Shift + G

Show Source Control

↑ Shift + ⌘ Cmd + D

Show Debug

↑ Shift + ⌘ Cmd + X

Show Extensions

↑ Shift + ⌘ Cmd + H

Replace in files

↑ Shift + ⌘ Cmd + J

Toggle Search details

↑ Shift + ⌘ Cmd + U

Show Output panel

↑ Shift + ⌘ Cmd + V

Open Markdown preview

⌘ Cmd + K then V

V Open Markdown preview to the side

⌘ Cmd + K then Z

Z Zen Mode (Esc Esc to exit)

F9

Toggle breakpoint

F5

Start/Continue

↑ Shift + F5

Stop

F11

Step into

↑ Shift + F11

Step out

F10

Step over

⌘ Cmd + K then ⌘ Cmd + I

Show hover

Control + `

Show integrated terminal

Control + ↑ Shift + `

Create new terminal

⌘ Cmd + C

Copy selection

⌘ Cmd + ↑ ↓

Scroll up/down

Page Up

Scroll page up

Page Down

Scroll page down

⌘ Cmd + Home

Scroll to top

⌘ Cmd + End

Scroll to bottom

Commenting code is great. We all do it, all day long. Commonly I’ll see the following done to comment multiple lines of C# code.

[HOME],[/],[/],[UP],[HOME],<Repeat />

This just takes too long. It’s too many keystrokes. This Quick 2 minute video shows you all about commenting, and uncommenting, and even has an added little trick to know about ASP.NET (ASPX) Commenting.

[CTRL]+[K],[C] = Comment the current line, or selected lines of code

[CTRL]+[K],[U] = Uncomment the current line, or selected lines of code

http://scottcate.looplogic.com/vstricks017

Comments

Visual Studio For Mac Shortcuts

comments