Keyboard shortcuts for macOS - Visual Studio Code

0 downloads 232 Views 414KB Size Report
Remove line comment. ⌘/. Toggle line comment. ⇧⌥A. Toggle block comment. ⌥Z. Toggle word wrap. Multi-cursor and
Search and replace

Keyboard shortcuts for macOS General

Reopen closed editor

⌘K Enter

Keep preview mode editor open

⌘F

Find

⌃Tab / ⌃⇧Tab

⌥⌘F

Replace

Open next / previous

⌘K P

⌘G / ⇧⌘G

Find next/previous

Copy path of active file

⌘K R

⌥Enter

Select all occurrences of Find match

Reveal active file in Explorer

⌘K O

⌘D

Add selection to next Find match

Show active file in new window/instance

⌘K ⌘D

Move last selection to next Find match

⇧⌘P, F1

Show Command Palette

⌘P

Quick Open, Go to File…

⇧⌘N

New window/instance

⌘W

Close window/instance

⌃Space

⌘,

User Settings

⌘K ⌘S

Keyboard Shortcuts

Basic editing

⇧⌘T

Rich languages editing

Display ⌃⌘F

Toggle full screen

⌥⌘1

Trigger suggestion

Toggle editor layout (horizontal/vertical)

⌘= / ⇧⌘-

⇧⌘Space

Trigger parameter hints

Zoom in/out

⌘B

⇧⌥F

Format document

Toggle Sidebar visibility

⇧⌘E

⌘K ⌘F

Format selection

Show Explorer / Toggle focus

⇧⌘F

Go to Definition

Show Search

F12

⌃⇧G

⌥F12

Peek Definition

Show Source Control

⇧⌘D

⌘K F12

Open Definition to the side

Show Debug

⇧⌘X

⌘.

Quick Fix

Show Extensions

⇧⌘H

⇧F12

Show References

Replace in files

⇧⌘J

Rename Symbol

Toggle Search details

F2

⇧⌘U

⌘K ⌘X

Trim trailing whitespace

Show Output panel

⇧⌘V

⌘K M

Change file language

Open Markdown preview

⌘K V

Open Markdown preview to the side

⌘K Z

Zen Mode (Esc Esc to exit)

⌘X

Cut line (empty selection)

⌘C

Copy line (empty selection)

⌥↓ / ⌥↑

Move line down/up

⇧⌥↓ / ⇧⌥↑

Copy line down/up

⇧⌘K

Delete line

⌘Enter / ⇧⌘Enter

Insert line below/above

⇧⌘\

Jump to matching bracket

⌘] / ⌘[

Indent/outdent line

Home / End

Go to beginning/end of line

⌘↑ / ⌘↓

Go to beginning/end of file

⌘T

Show all Symbols

Debug

⌃PgUp / ⌃PgDn

Scroll line up/down

⌃G

Go to Line...

F9

⌘PgUp /⌘PgDn

Scroll page up/down

⌘P

Go to File...

Toggle breakpoint

F5

⌥⌘[ / ⌥⌘]

Fold/unfold region

⇧⌘O

Go to Symbol...

Start/Continue

F11 / ⇧F11

⌘K ⌘[ / ⌘K ⌘]

Fold/unfold all subregions

⇧⌘M

Show Problems panel

Step into/ out

F10

⌘K ⌘0 / ⌘K ⌘J

Fold/unfold all regions

F8 / ⇧F8

Go to next/previous error or warning

Step over

⇧F5

⌘K ⌘C

Add line comment

⌃⇧Tab

Navigate editor group history

Stop

⌘K ⌘I

⌘K ⌘U

Remove line comment

⌃- / ⌃⇧-

Go back/forward

Show hover

⌘/

Toggle line comment

⌃⇧M

Toggle Tab moves focus

⇧⌥A

Toggle block comment

⌥Z

Toggle word wrap

Multi-cursor and selection

Navigation

Editor management

Integrated terminal ⌃`

Show integrated terminal

⌃⇧`

Create new terminal

⌘W

Close editor

⌘C

⌘K F

Close folder

Copy selection

⌘↑ / ↓

Scroll up/down

⌥ + click

Insert cursor

⌘\

Split editor

PgUp / PgDn

⌥⌘↑

Insert cursor above

⌘1 / ⌘2 / ⌘3

Focus into 1st, 2nd, 3rd editor group

Scroll page up/down

⌘Home / End

⌥⌘↓

Insert cursor below

⌘K ⌘← / ⌘K ⌘→

Focus into previous/next editor group

Scroll to top/bottom

⌘U

Undo last cursor operation

⌘K ⇧⌘← / ⌘K ⇧⌘→

Move editor left/right

⇧⌥I

Insert cursor at end of each line selected

⌘K ← / ⌘K →

Move active editor group

⌘I

Select current line

⇧⌘L

Select all occurrences of current selection

⌘F2

Select all occurrences of current word

⌃⇧⌘→ / ←

Expand / shrink selection

⇧⌥ + drag mouse

Column (box) selection

⇧⌥⌘↑ / ↓

Column (box) selection up/down

⇧⌥⌘← / →

Column (box) selection left/right

⇧⌥⌘PgUp

Column (box) selection page up

⇧⌥⌘PgDn

Column (box) selection page down

File management ⌘N

New File

⌘O

Open File...

⌘S

Save

⇧⌘S

Save As...

⌥⌘S

Save All

⌘W

Close

⌘K ⌘W

Close All

Other operating systems’ keyboard shortcuts and additional unassigned shortcuts available at aka.ms/vscodekeybindings