Visual Studio Code (Mac) keyboard shortcuts

Visual Studio Code (Mac)  

Zeynel Öztürk -
6 years ago
- Shortcuts
3
↑  Shift + ⌘ Cmd + P then F1

Show Command Palette

-1
⌘ Cmd + P

Quick Open, Go to File

1
↑  Shift + ⌘ Cmd + N

New window/instance

1
⌘ Cmd + W

Close window/instance

1
⌘ Cmd + ,

User Settings

0
⌘ Cmd + K then ⌘ Cmd + S

Keyboard Shortcuts

Advertisement

1
⌘ Cmd + X

Cut line (empty selection)

0
⌘ Cmd + C

Copy line (empty selection)

-1
⌥ Opt +   

Move line up/down

1
↑  Shift + ⌥ Opt +   

Copy line up / down

0
⌘ Cmd + ⤶ Enter

Insert line below

0
↑  Shift + ⌘ Cmd + ⤶ Enter

Insert line above

0
↑  Shift + ⌘ Cmd + \

Jump to matching bracket

-1
⌘ Cmd + ]

Indent/outdent line

1
or ⌘ Cmd + [
-3
Home

Go to beginning of line

1
End

Go to end of line

1
⌘ Cmd +

Go to beginning of file

0
⌘ Cmd +

Go to end of file

0
Ctrl +   

Scroll line up/down

0
Control + Page Up

Scroll page up

0
Control + Page Down

Scroll page down

2
⌥ Opt + ⌘ Cmd + [

Fold (collapse) region

0
⌥ Opt + ⌘ Cmd + ]

Unfold (uncollapse) region

0
⌘ Cmd + K then ⌘ Cmd + [

Fold (collapse) all subregions

0
⌘ Cmd + K then ⌘ Cmd + ]

Unfold (uncollapse) all subregions

0
⌘ Cmd + K then ⌘ Cmd + 0

Fold (collapse) all regions

0
⌘ Cmd + K then ⌘ Cmd + J

Unfold (uncollapse) all regions

2
⌘ Cmd + K then ⌘ Cmd + C

Add line comment

5
⌘ Cmd + K then ⌘ Cmd + U

Remove line comment

1
⌘ Cmd + /

Toggle line comment

0
↑  Shift + ⌥ Opt + A

Toggle block comment

1
⌥ Opt + Z

Toggle word wrap

0
⌘ Cmd + T

Show all symbols

0
Control + G

Go to line

1
⌘ Cmd + P

Go to file

1
↑  Shift + ⌘ Cmd + O

Go to symbol

1
↑  Shift + ⌘ Cmd + M

Show Problems panel

0
F8

Go to next error or warning

0
↑  Shift + F8

Go to previous error or warning

0
Ctrl + ↑  Shift + Tab

Navigate editor group history

1
Ctrl + -

Go back

-1
Ctrl + ↑  Shift + -

Go forward

0
Ctrl + ↑  Shift + M

Toggle Tab moves focus

1
⌘ Cmd + F

Find

3
⌥ Opt + ⌘ Cmd + F

Replace

1
⌘ Cmd + G

Find next

0
↑  Shift + ⌘ Cmd + G

Find previous

0
⌥ Opt + ⤶ Enter

Select all occurences of Find match

0
⌘ Cmd + D

Add selection to next Find match

0
⌘ Cmd + K then ⌘ Cmd + D

Move last selection to next Find match

-1
⌥ Opt +

Insert cursor

0
⌥ Opt + ⌘ Cmd +   

Insert cursor above / below

1
⌘ Cmd + U

Undo last cursor operation

0
↑  Shift + ⌥ Opt + I

Insert cursor at end of each line selected

Advertisement

1
⌘ Cmd + I

Select current line

-2
↑  Shift + ⌘ Cmd + L

Select all occurrences of current selection

1
⌘ Cmd + F2

Select all occurrences of current word

0
Ctrl + ↑  Shift + ⌘ Cmd +

Expand selection

2
Ctrl + ↑  Shift + ⌘ Cmd +

Shrink selection

0
↑  Shift + ⌥ Opt +

Column (box) selection

0
↑  Shift + ⌥ Opt + ⌘ Cmd +   

Column (box) selection left/right

0
Shift + Option + Command + Page Up

Column (box) selection page up

0
Shift + Option + Command + Page Down

Column (box) selection page down

0
Ctrl + Space

Trigger suggestion

0
↑  Shift + ⌘ Cmd + Space

Trigger parameter hints

0
↑  Shift + ⌥ Opt + F

Format document

2
⌘ Cmd + K then ⌘ Cmd + F

Format selection

0
F12

Go to Definition

0
⌥ Opt + F12

Peek Definition

0
⌘ Cmd + K then F12

12 Open Definition to the side

0
⌘ Cmd + .

Quick Fix

1
↑  Shift + F12

Show References

0
F2

Rename Symbol

0
⌘ Cmd + K then ⌘ Cmd + X

Trim trailing whitespace

0
⌘ Cmd + K then M

M Change file language

-1
⌘ Cmd + W

Close editor

0
⌘ Cmd + K then F

F Close folder

-1
⌘ Cmd + \

Split editor

1
⌘ Cmd + 1

Focus into first group

0
⌘ Cmd + 2

Focus into second group

0
⌘ Cmd + 3

Focus into third group

0
⌘ Cmd + K then ⌘ Cmd +   

Focus into previous/next editor group

0
⌘ Cmd + K then ↑  Shift + ⌘ Cmd +

Move editor left

0
⌘ Cmd + K then ↑  Shift + ⌘ Cmd +

Move editor right

0
⌘ Cmd + K then   

Move active editor group

0
⌘ Cmd + N

New File

0
⌘ Cmd + O

Open File

0
⌘ Cmd + S

Save

0
↑  Shift + ⌘ Cmd + S

Save As

0
⌥ Opt + ⌘ Cmd + S

Save All

0
⌘ Cmd + W

Close

0
⌘ Cmd + K then ⌘ Cmd + W

Close All

0
Ctrl + ↑  Shift + T

Reopen closed editor

0
⌘ Cmd + K then ⤶ Enter

Keep preview mode editor open

0
Control + Tab

Open next

0
Control + ↑  Shift + Tab

Open previous

0
⌘ Cmd + K then P

Copy path of active file

0
⌘ Cmd + K then R

Reveal active file in Explorer

0
⌘ Cmd + K then O

Show active file in new window/instance

0
Control + ⌘ Cmd + F

Toggle full screen

1
⌥ Opt + ⌘ Cmd + 1

Toggle editor layout (horizontal/vertical)

-6
⌘ Cmd + =

Zoom in

3
↑  Shift + ⌘ Cmd + -

Zoom out

-1
⌘ Cmd + B

Toggle Sidebar visibility

0
↑  Shift + ⌘ Cmd + E

Show Explorer / Toggle focus

0
↑  Shift + ⌘ Cmd + F

Show Search

0
Control + ↑  Shift + G

Show Source Control

0
↑  Shift + ⌘ Cmd + D

Show Debug

0
↑  Shift + ⌘ Cmd + X

Show Extensions

0
↑  Shift + ⌘ Cmd + H

Replace in files

0
↑  Shift + ⌘ Cmd + J

Toggle Search details

0
↑  Shift + ⌘ Cmd + U

Show Output panel

0
↑  Shift + ⌘ Cmd + V

Open Markdown preview

0
⌘ Cmd + K then V

Open Markdown preview to the side

0
⌘ Cmd + K then Z

Zen Mode (Esc Esc to exit)

0
F9

Toggle breakpoint

4
F5

Start/Continue

0
↑  Shift + F5

Stop

0
F11

Step into

0
↑  Shift + F11

Step out

0
F10

Step over

0
⌘ Cmd + K then ⌘ Cmd + I

Show hover

-1
Control + `

Show integrated terminal

0
Control + ↑  Shift + `

Create new terminal

0
⌘ Cmd + C

Copy selection

1
⌘ Cmd +   

Scroll up/down

0
Page Up

Scroll page up

0
Page Down

Scroll page down

0
⌘ Cmd + Home

Scroll to top

0
⌘ Cmd + End

Scroll to bottom


Share this page on:
Is this page helpful?
3 0

Program information

Program name: Visual Studio Code (Mac) Visual Studio Code (Mac) (Developer tools)

Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS. It has features such as debugging, Git control, syntax highlighting, smart code completion, snippets and refactoring. It's free and open-source, however official download is under a proprietary license.

Web page: code.visualstudio.com

Last update: 1/16/2021 8:49 AM UTC

How easy to press shortcuts: 68%

More information >>

Shortcut count: 131

Platform detected: macOS

Similar programs




What is your favorite Visual Studio Code (Mac) hotkey? Do you have any useful tips for it? Let other users know below.


 
No comments yet. Ask, or type the first one!