66 Useful Visual Studio Code Keyboard Shortcuts for MacOS2 min read
Visual Studio Code is one of the most popular code editors today, if you are using Visual Studio Code on MacOS, don’t forget the following helpful shortcuts:
General
- ⇧⌘P, F1 Show Command Palette
- ⌘P Quick Open, Go to File…
- ⇧⌘N New window/instance
- ⌘W Close window/instance
- ⌘, User Settings
- ⌘K ⌘S Keyboard Shortcuts
Basic Editing
- ⌘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
- ⌃PgUp / ⌃PgDn Scroll line up/down
- ⌘PgUp /⌘PgDn Scroll page up/down
- ⌥⌘[ / ⌥⌘] Fold/unfold region
- ⌘K ⌘[ / ⌘K ⌘] Fold/unfold all subregions
- ⌘K ⌘0 / ⌘K ⌘J Fold/unfold all regions
- ⌘K ⌘C Add line comment
- ⌘K ⌘U Remove line comment
- ⌘/ Toggle line comment
- ⇧⌥A Toggle block comment
- ⌥Z Toggle word wrap
Navigation
- ⌘T Show all Symbols
- ⌃G Go to Line…
- ⌘P Go to File…
- ⇧⌘O Go to Symbol…
- ⇧⌘M Show Problems panel
- F8 / ⇧F8 Go to next/previous error or warning
- ⌃⇧Tab Navigate editor group history
- ⌃- / ⌃⇧- Go back/forward
- ⌃⇧M Toggle Tab moves focus
File Management
- ⌘N New File
- ⌘O Open File…
- ⌘S Save
- ⇧⌘S Save As…
- ⌥⌘S Save All
- ⌘W Close
- ⌘K ⌘W Close All
- ⇧⌘T Reopen closed editor
- ⌘K Enter Keep preview mode editor open
- ⌃Tab / ⌃⇧Tab Open next / previous
- ⌘K P Copy path of active file
- ⌘K R Reveal active file in Explorer
- ⌘K O Show active file in new window/instance
Display
- ⌘= / ⇧⌘- Zoom in/out
- ⇧⌘F Show Search
- ⌃⇧G Show Source Control
- ⇧⌘D Show Debug
- ⇧⌘X Show Extensions
- ⇧⌘H Replace in files
- ⌘K Z Zen Mode (Esc Esc to exit)
Debug
- F9 Toggle breakpoint
- F5 Start/Continue
- F11 / ⇧F11 Step into/ out
- F10 Step over
- ⇧F5 Stop
- ⌘K ⌘I Show hover
Integrated Terminal
- ⌃` Show integrated terminal
- ⌃⇧` Create new terminal
- ⌘C Copy selection
- ⌘↑ / ↓ Scroll up/down PgUp / PgDn Scroll page up/down
- ⌘Home / End Scroll to top/bottom
Subscribe
0 Comments
Most Voted