Visual Studio Code
Visual Studio Code (VS Code), launched by Microsoft in 2015, has quickly become the most popular code editor worldwide, with over 70% of developers using it. Known for its speed, extensibility, and cross-platform support, VS Code allows you to customize workflows with thousands of extensions. Fun fact: Itβs built on Electron, which means it runs like a web app! With features like IntelliSense, debugging, and Git integration, VS Code makes coding faster, smarter, and more enjoyable.
Shortcuts
General
Window | Mac | Description |
---|---|---|
CtrlShiftP | ββ§P | Show Command Palette |
CtrlP | βP | Quick Open, Go to File |
CtrlShiftN | ββ§N | New window/instance |
CtrlShiftW | βW | Close window/instance |
Ctrl, | β, | User Settings |
CtrlKS | βKS | Keyboard Shortcuts |
Basic editing
Window | Mac | Description |
---|---|---|
CtrlX | βX | Cut line (empty selection) |
CtrlC | βC | Copy line (empty selection) |
Altββ | β₯ββ | Move line up/down |
ShiftAltββ | β§β₯ββ | Copy line up/down |
CtrlShiftK | ββ§K | Delete line |
CtrlEnter | ββ | Insert line below |
CtrlShiftEnter | ββ§β | Insert line above |
CtrlShift\ | ββ§\ | Jump to matching bracket |
Ctrl] | β] | Indent line |
Ctrl[ | β[ | Outdent line |
Home | Home | Go to beginning of line |
End | End | Go to end of line |
CtrlHome | ββ | Go to beginning of file |
CtrlEnd | ββ | Go to end of file |
Ctrlββ | βPgUpPgDn | Scroll line up/down |
AltPausePgDn | βPgUpPgDn | Scroll page up/down |
CtrlShift[ | ββ₯[ | Fold (collapse) region |
CtrlShift] | ββ₯] | Unfold (uncollapse) region |
CtrlK[ | βK[ | Fold (collapse) all subregions |
CtrlK] | βK] | Unfold (uncollapse) all subregions |
CtrlK0 | βK0 | Fold (collapse) all regions |
CtrlKJ | βKJ | Unfold (uncollapse) all regions |
CtrlKC | βKC | Add line comment |
CtrlKU | βKU | Remove line comment |
Ctrl/ | β/ | Toggle line comment |
ShiftAltA | β§β₯A | Toggle block comment |
AltZ | β₯Z | Toggle word wrap |
Navigation
Window | Mac | Description |
---|---|---|
CtrlT | βT | Show all Symbols |
CtrlG | β₯G | Go to Line |
CtrlP | βP | Go to File |
CtrlShiftO | ββ§O | Go to Symbol |
CtrlShiftM | ββ§M | Show Problems panel |
F8 | FnF8 | Go to next error or warning |
ShiftF8 | β§FnF8 | Go to previous error or warning |
CtrlShiftTab | ββ§β₯ | Navigate editor group history |
Altβ | β- | Go back |
Altβ | ββ§- | Go forward |
CtrlM | ββ§M | Toggle Tab moves focus |
Search and replace
Window | Mac | Description |
---|---|---|
CtrlF | βF | Find |
CtrlH | β₯βF | Replace |
F3 | βG | Find next |
ShiftF3 | ββ§G | Find previous |
AltEnter | β₯β | Select all occurences of Find match |
CtrlD | βD | Add selection to next Find match |
CtrlKD | βKD | Move last selection to next Find match |
AltC | β | Toggle case-sensitive |
AltR | β | Toggle regex |
AltW | β | Toggle whole word |
Multi-cursor and selection
Window | Mac | Description |
---|---|---|
Alt | β₯ | Insert cursor |
CtrlAltβ | β₯ββ | Insert cursor above |
CtrlAltβ | β₯ββ | Insert cursor below |
CtrlU | βU | Undo last cursor operation |
ShiftAltI | β§β₯I | Insert cursor at end of each line selected |
CtrlL | βL | Select current line |
CtrlShiftL | ββ§L | Select all occurrences of current selection |
CtrlF2 | βFnF2 | Select all occurrences of current word |
ShiftAltβ | ββ§ββ | Expand selection |
ShiftAltβ | ββ§ββ | Shrink selection |
CtrlShiftAltArrow Keys | β§β₯β | Column (box) selection |
CtrlShiftAltPgUpPgDn | β§β₯βPgUpPgDn | Column (box) selection page up/down |
Rich languages editing
Window | Mac | Description |
---|---|---|
CtrlSpace | β₯Space | Trigger suggestion |
CtrlShiftSpace | β§βSpace | Trigger parameter hints |
ShiftAltF | β§β₯F | Format document |
CtrlKF | βKF | Format selection |
F12 | F12 | Go to Definition |
AltF12 | β₯F12 | Peek Definition |
CtrlKF12 | βKF12 | Open Definition to the side |
Ctrl. | β. | Quick Fix |
ShiftF12 | β§F12 | Show References |
F2 | F2 | Rename Symbol |
CtrlKX | βKX | Trim trailing whitespace |
CtrlKM | βKM | Change file language |
Editor management
Window | Mac | Description |
---|---|---|
CtrlW | βW | Close editor |
CtrlKF | βKF | Close folder |
Ctrl\ | β\ | Split editor |
Ctrl123 | β123 | Focus into 1 st, 2nd or 3rd editor group |
CtrlKβ | βKβ | Focus into previous editor group |
CtrlKβ | βKβ | Focus into next editor group |
CtrlShiftPgUpPgDn | β§βKββ | Move editor left/right |
CtrlKββ | βKββ | Move active editor group |
File management
Window | Mac | Description |
---|---|---|
CtrlS | βS | Save |
CtrlShiftS | ββ§S | Save As |
CtrlKS | β₯βS | Save all |
CtrlF4 | βW | Close |
CtrlKW | βKW | Close All |
CtrlShiftT | β§βT | Reopen closed editor |
CtrlKEnter | βKβ | Keep preview mode editor open |
CtrlTab | ββ₯ | Open next |
CtrlShiftTab | ββ§β₯ | Open previous |
CtrlKP | βKP | Copy path of active file |
CtrlKR | βKR | Reveal active file in Finder |
CtrlKO | βKO | Show active file in new window/instance |
CtrlN | βN | New File |
CtrlO | βO | Open File |
Display
Window | Mac | Description |
---|---|---|
F11 | ββF | Toggle full screen |
ShiftAlt0 | β₯β0 | Toggle editor layout (horizontal/vertical) |
Ctrl= | β= | Zoom in |
Ctrl- | ββ§- | Zoom out |
CtrlB | βB | Toggle Sidebar visibility |
CtrlShiftE | ββ§E | Show Explorer / Toggle focus |
CtrlShiftF | ββ§F | Show Search |
CtrlShiftG | ββ§G | Show Source Control |
CtrlShiftD | ββ§D | Show Debug |
CtrlShiftX | β§βX | Show Extensions |
CtrlShiftH | ββ§H | Replace in files |
CtrlShiftJ | ββ§J | Toggle Search details |
CtrlShiftU | ββ§U | Show Output panel |
CtrlShiftV | ββ§V | Open Markdown preview |
CtrlKV | βKV | Open Markdown preview to the side |
CtrlKZ | βKZ | Zen Mode (Esc Esc to exit) |
Debug
Window | Mac | Description |
---|---|---|
F9 | F9 | Toggle breakpoint |
F5 | F5 | Start/Continue |
ShiftF5 | β§F5 | Stop |
F11 | F11 | Step into |
ShiftF11 | β§F11 | Step out |
F10 | F10 | Step over |
CtrlKI | βKI | Show hover |
Integrated terminal
Window | Mac | Description |
---|---|---|
Ctrl` | β` | Show integrated terminal |
CtrlShift` | ββ§` | Create new terminal |
CtrlC | βC | Copy selection |
CtrlV | β | Paste into active terminal |
Ctrlββ | βββ | Scroll up/down |
ShiftPgUpPgDn | PgUpPgDn | Scroll page up/down |
CtrlHomeEnd | βHomeEnd | Scroll to top/bottom |