Visual Studio Code (Windows) keyboard shortcuts

Visual Studio Code (Windows)  

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

Show Command Palette

3
Ctrl + P

Quick Open, Go to File

8
Ctrl + ↑  Shift + N

New window/instance

5
Ctrl + ↑  Shift + W

Close window/instance

3
Ctrl + ,

User Settings

7
Ctrl + K then Ctrl + S

Keyboard Shortcuts

Advertisement

1
Ctrl + X

Cut line (empty selection)

7
Ctrl + C

Copy line (empty selection)

5
Alt +   

Move line up/down

5
↑  Shift + Alt +   

Copy line up/down

6
Ctrl + ↑  Shift + K

Delete line

6
Ctrl + ⤶ Enter

Insert line below

2
Ctrl + ↑  Shift + ⤶ Enter

Insert line above

2
Ctrl + ↑  Shift + \

Jump to matching bracket

-10
Ctrl + ]

Indent/outdent line

3
or Ctrl + [
0
Home

Go to beginning of line

0
End

Go to end of line

1
Ctrl + Home

Go to beginning of file

3
Ctrl + End

Go to end of file

3
Ctrl +   

Scroll line up/down

0
Alt + Page Up

Scroll page up

-1
Alt + Page Down

Scroll page down

1
Ctrl + ↑  Shift + [

Fold (collapse) region

0
Ctrl + ↑  Shift + ]

Unfold (uncollapse) region

-1
Ctrl + K then Ctrl + [

Fold (collapse) all subregions

-1
Ctrl + K then Ctrl + ]

Unfold (uncollapse) all subregions

4
Ctrl + K then Ctrl + 0

Fold (collapse) all regions

0
Ctrl + K then Ctrl + J

Unfold (uncollapse) all regions

-1
Ctrl + K then Ctrl + C

Add line comment

8
Ctrl + K then Ctrl + U

Remove line comment

3
Ctrl + /

Toggle line comment

8
↑  Shift + Alt + A

Toggle block comment

8
Alt + Z

Toggle word wrap

-2
Ctrl + T

Show all symbols

-2
Ctrl + G

Go to line

1
Ctrl + P

Go to file

2
Ctrl + ↑  Shift + O

Go to symbol

3
Ctrl + ↑  Shift + 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

2
Alt +   

Go back / forward

-1
Ctrl + M

Toggle Tab moves focus

2
Ctrl + F

Find

5
Ctrl + H

Replace

2
F3

Find next

0
↑  Shift + F3

Find previous

-1
Alt + ⤶ Enter

Select all occurences of Find match

1
Ctrl + D

Add selection to next Find match

0
Ctrl + K then Ctrl + D

Move last selection to next Find match

-2
Alt + C

Toggle case-sensitive

0
Alt + R

Toggle regex

0
Alt + W

Toggle whole word

2
Alt +

Insert cursor

Advertisement

1
Ctrl + Alt +   

Insert cursor above / below

0
Ctrl + U

Undo last cursor operation

6
↑  Shift + Alt + I

Insert cursor at end of each line selected

-2
Ctrl + I

Select current line

6
Ctrl + ↑  Shift + L

Select all occurrences of current selection

1
Ctrl + F2

Select all occurrences of current word

0
↑  Shift + Alt +

Expand selection

0
↑  Shift + Alt +

Shrink selection

1
↑  Shift + Alt +

Column (box) selection

-1
or Ctrl + ↑  Shift + Alt +
0
Ctrl + Shift + Alt + Page Up

Column (box) selection page up

1
Ctrl + Shift + Alt + Page Down

Column (box) selection page down

3
Ctrl + Space

Trigger suggestion

0
Ctrl + ↑  Shift + Space

Trigger parameter hints

6
↑  Shift + Alt + F

Format document

2
Ctrl + K then Ctrl + F

Format selection

1
F12

Go to Definition

0
Alt + F12

Peek Definition

-1
Ctrl + K then F12

Open Definition to the side

5
Ctrl + .

Quick Fix

0
↑  Shift + F12

Show References

1
F2

Rename Symbol

0
Ctrl + K then Ctrl + X

Trim trailing whitespace

0
Ctrl + K then M

M Change file language

0
Ctrl + F4 then Ctrl + W

Close editor

-1
Ctrl + K

F Close folder

6
Ctrl + \

Split editor

0
Ctrl + 1

Focus into first group

0
Ctrl + 2

Focus into second group

0
Ctrl + 3

Focus into third group

0
Ctrl + K then Ctrl +   

Focus into previous/next editor group

0
Ctrl + Shift + Page Up

Move editor left

0
Ctrl + Shift + Page Down

Move editor right

1
Ctrl + K then   

Move active editor group

0
Ctrl + N

New File

-1
Ctrl + O

Open File

1
Ctrl + K then Ctrl + O

Open folder

0
Ctrl + R

Open recent

1
Ctrl + S

Save

0
Ctrl + ↑  Shift + S

Save As

1
Ctrl + K then S

Save All

1
Ctrl + F4

Close

0
Ctrl + K then Ctrl + W

Close All

0
Ctrl + ↑  Shift + T

Reopen closed editor

1
Ctrl + K

Enter Keep preview mode editor open

0
Ctrl + Tab

Open next

2
Ctrl + ↑  Shift + Tab

Open previous

-1
Ctrl + K then P

Copy path of active file

0
Ctrl + K then R

Reveal active file in Explorer

0
Ctrl + K then O

Show active file in new window/instance

-2
F11

Toggle full screen

0
↑  Shift + Alt + 1

Toggle editor layout (horizontal/vertical)

3
Ctrl + =

Zoom in

4
Ctrl + -

Zoom out

2
Ctrl + B

Toggle Sidebar visibility

0
Ctrl + ↑  Shift + E

Show Explorer / Toggle focus

1
Ctrl + ↑  Shift + F

Show Search

-1
Ctrl + ↑  Shift + G

Show Source Control

0
Ctrl + ↑  Shift + D

Show Debug

1
Ctrl + ↑  Shift + X

Show Extensions

1
Ctrl + ↑  Shift + H

Replace in files

1
Ctrl + ↑  Shift + J

Toggle Search details

0
Ctrl + ↑  Shift + U

Show Output panel

1
Ctrl + ↑  Shift + V

Open Markdown preview

-1
Ctrl + K then V

Open Markdown preview to the side

0
Ctrl + K then Z

Zen Mode (Esc Esc to exit)

0
F9

Toggle breakpoint

0
F5

Start/Continue

2
↑  Shift + F5

Stop

0
F11

Step into

0
↑  Shift + F11

Step out

0
F10

Step over

0
Ctrl + K then Ctrl + I

Show hover

0
Ctrl + `

Show integrated terminal

0
Ctrl + ↑  Shift + `

Create new terminal

0
Ctrl + C

Copy selection

1
Ctrl + V

Paste into active terminal

0
Ctrl +   

Scroll up/down

0
Shift + Page Up

Scroll page up

0
Shift + Page Down

Scroll page down

1
Ctrl + Home

Scroll to top

0
Ctrl + End

Scroll to bottom

1
Ctrl + Alt + M

Pretty JSON formatting


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

Program information

Program name: Visual Studio Code (Windows) Visual Studio Code (Windows) (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: 3/8/2021 4:12 PM UTC

How easy to press shortcuts: 70%

More information >>

Updated: Added some shortcuts. (6 updates.) 12/25/2019 11:13:07 AM Added some shortcuts.
12/25/2019 11:14:27 AM Updated program information.
1/16/2021 9:44:28 AM Added some shortcuts.
1/16/2021 9:45:36 AM Added some shortcuts.
3/8/2021 5:08:47 PM Added some shortcuts.

Shortcut count: 138

Platform detected: Windows or Linux

Similar programs




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


 

hmsolomon OP says : 5 years ago 12/24/2018 3:48 AM
MS Visual Studio Code needs a keyboard shortcut for erasing the terminal window output area. Now we have click on the trash can, "Kill Terminal", to get a clean slate.