Skip to content

VS Code shortcuts

Posted on:August 13, 2024 at 10:20 AM

Table of contents

Open Table of contents

General

Show all commands: > ...

New window/instance:

Close window/instance:

New untitled file:

Close file:

User Settings:

Keyboard Shortcuts:

Line operations

Delete a line

Move a line down/up

Copy a line down/up

Insert a line below/above

Indent/outdent a line

Moving the cursor

Jump to matching bracket

Go to beginning/end of line

Go to beginning/end of file

Move cursor word by word

Comments

Toggle line comment

Toggle block comment

Toggle word wrap

Multi-cursor

Insert cursor above

Insert cursor below

Undo last cursor operation

Insert cursor at end of each line selected

Selection

Select current line

Select all occurrences of current selection & place multi-cursor on them

Select all occurrences of current word (where your cursor is) & place multi-cursor on them

Select until the end of the word

Select a Column/Box of code with arrow keys

Select a Column/Box of code by mouse drag

Fold/unfold

Toggle fold

Search and replace

Search within the active file

Search globally

Toggle Match Case

Toggle Match Whole Word

Toggle Use Regular Expression

Find and replace sg in current file

Replace in files

Find next

Find previous

Add selection to next Find match

Move last selection to next Find match

Move between Find results in active file

Select all occurences of Find match

Editing

Toggle between overwrite/insert modes

Go to Line…: ...

Quick Open, Go to File: instantly find & open files

Quick switch between open files/tabs

Navigate Tab Groups

* Win: Ctr+1 / Ctr+2 / Ctr+3 etc

Go to Symbol…in Editor: @ ...

Go to Symbol … in Workspace: # ...

Go to last edit location

Go to next symbol highlight

Go to previous symbol highlight

Navigate through errors and warnings

Editor management

File management

New file:

Open file

Save file

Save file as

Save all

Close file

Close all files

Display

Toggle Primary Sidebar

Toggle Secondary Sidebar

Show Explorer / Toggle focus

Show Source Control

Show Debug

Show Extensions

Open Markdown previews

Toggle Problems

Toggle Debug Console

Toggle Output

Zoom in

Zoom out

Show hover

Debug

Toggle breakpoint

Start/Continue

Step into

Step out

Step over

Stop

Integrated terminal

Toggle Terminal panel

Split Terminal

Renaming

Rename symbol

Format code

File formatting

Selection formatting

Better coding

Go to definition

Peek definition (see definition without moving to a different file/line)

Show a function’s signature

Toggle code suggestions (VS Code, Copilot, etc)

Sources