Tips & Tricks

This page contains a few tips and tricks that may make it easier for you to use VS Code.


VS Code includes a number of keyboard shortcuts that can come in handy. Linux and Windows use Control (Ctrl) and Alt (Alt), while MacOS uses Command (Cmd) and Option (Opt).

Common Shortcuts

Shortcuts for Linux and Windows

Shortcuts for MacOS


Ctrl + S

Cmd + S

Save the current file

Ctrl + X

Cmd + X

Cut line (or selection)

Ctrl + C

Cmd + C

Copy line (or selection)

Ctrl + V

Cmd + V


Ctrl + ]

Cmd + ]

Indent line

Ctrl + [

Cmd + [

Outdent line

Ctrl + /

Cmd + /

Toggle line comment

Shift + Alt + A

Shift + Opt + A

Toggle block comment

Alt + Z

Option + Z

Toggle word wrap

For a full list of shortcuts see the following links: