Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
Last active December 24, 2024 06:56
Show Gist options
  • Save bradtraversy/b28a0a361880141af928ada800a671d9 to your computer and use it in GitHub Desktop.
Save bradtraversy/b28a0a361880141af928ada800a671d9 to your computer and use it in GitHub Desktop.
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

Open/View

Open Command Pallete

Shift+Cmd+P
Shift+Ctrl+P

Access Settings

Cmd+,
Ctrl+,

Toggle Terminal

Ctrl+`
Ctrl+`

Create New Terminal

Shift+Ctrl+`
Shift+Ctrl+`

Toggle Sidebar

Cmd+B 
Ctrl+B

Open New Window/Instance

Shift+Cmd+N 
Shift+Ctrl+N

Close Window

Cmd+W 
Ctrl+W

Working With Files

Sidebar Focus

Shift+Cmd+E
Shift+Ctrl+E

Open File/Folder From Sidebar

Cmd+Down
Ctrl+Down

Change File Tabs

Ctrl+Tab 
Ctrl+PageUP

Quick File Open

Cmd+P
Ctrl+P

Open File From Explorer

Cmd+O
Ctrl+O

New File

Cmd+N
Ctrl+N

Save

Cmd+S
Ctrl+S

Save As

Shift+Cmd+S
Shift+Ctrl+S

Close File

Cmd+W
Ctrl+W

Delete File

Cmd+Delete
Ctrl+Delete

Reopen Files

Shift+Cmd+T
Shift+Ctrl+T

Zoom

Cmd++ # Zoom in
Cmd+- # Zoom out

Ctrl++ # Zoom in
Ctrl+- # Zoom out

Spilt Editor

Cmd+\
Ctrl+\

Code Editing

Go To Start & End Of Line

Cmd+Right
Cmd+Left

Ctrl+Right
Ctrl+Left

home
end

Move By Word

Option+Right
Option+Left

Alt+Right
Alt+Left

Go To Start & End Of File

Cmd+Up
Cmd+Down

Ctrl+Home
Ctrl+End

Cut, Copy & Past Line

Cmd+X #Cut
Cmd+C #Copy
Cmd+V #Paste

Ctrl+X # Cut
Ctrl+C # Copy
Ctrl+V # Paste

Move Line Up & Down

Option+Up
Option+Down

Alt+Up
Alt+Down

Copy Line Up & Down

Shift+Option+Up
Shift+Option+Down

Shift+Alt+Up
Shift+Alt+Down

Remove Line

ShiftCmd+K
Shift+Ctrl+K

Insert Line

Cmd+Enter # Insert below
Shift+Cmd+Enter # Insert above

Ctrl+Enter # Insert below
Shift+Ctrl+Enter # Insert above

Jump To Matching Bracket

Shift+Cmd+\
Shift+Ctrl+\

Add Line Comment

Cmd+/
Ctrl+/

Add Block Comment

Shift+Option+A
Shift+Alt+A

Highlight Code

Shift+Any Direction

Select Next Match

Cmd+D
Ctrl+D

De-select Match

Cmd+U
Ctrl+U

Add Cursor

Option+Click
Alt+Click

Go to Entity (Functions, vars, etc)

Cmd+Shift+O
Ctrl+Shift+O
@cbreland
Copy link

shift + control + right
Highlight everything between brackets. Use multiple times to keep expanding outward.

shift + control + left
To minimize inward.

@iDestin
Copy link

iDestin commented May 11, 2021

Thank you

@IMArjunreddy
Copy link

thanks a lot :-)

@bharathrajappa
Copy link

Thanks

@narzk
Copy link

narzk commented Sep 25, 2021

helpful thank you

@teemotimy
Copy link

Thank you so much for this, Sire.

@jhynes94
Copy link

jhynes94 commented Jan 5, 2022

Really nice collection. Thanks Brad!

@dapao8525389
Copy link

Is there an undo commend in Mac?

@sadoyin
Copy link

sadoyin commented Jan 30, 2022

Very helpful

@Trapz107
Copy link

Thank you very much, these helps me so much while coding and increases my productivity

@mobo-9-0045
Copy link

Im looking How to navigate from 2 opened files in same winows of vscode

@faisalamin001
Copy link

Thanks, so useful shortcuts

@vyjith
Copy link

vyjith commented Mar 25, 2022

Thanks very usefull shortcuts 🤝

@flexcodec
Copy link

very helpful thank you

@KellynCodes
Copy link

this is awesome thanks

@LoannExe
Copy link

LoannExe commented Jul 6, 2022

and to zoom and dezoom?

@LUNA56144
Copy link

Thank you. Very helpful

@pritom-5
Copy link

ctrl + k + c --> comment out the highlighted section or the line
ctrl + k + u --> uncomment

@LeonardoRubio97
Copy link

Nice!

@B0nga071
Copy link

Thanks, very handy.

@stanbuklovskyi
Copy link

Thanks. Very helpful

@MadhuSudhan02
Copy link

thank you

@flexcodec
Copy link

Zoom In -----> Ctrl +

(De Zoom) Zoom Out -------> Ctrl -

@mohsen-alshoklia
Copy link

this is helpful, thank you

@payzone369
Copy link

This is great, thank you very much.

@omer-os
Copy link

omer-os commented Apr 28, 2023

Chrome Shortcuts:

  1. Open new tab: Ctrl+T (Windows) or Command+T (Mac)
  2. Close current tab: Ctrl+W (Windows) or Command+W (Mac)
  3. Reopen last closed tab: Ctrl+Shift+T (Windows) or Command+Shift+T (Mac)
  4. Switch between tabs: Ctrl+Tab (Windows) or Command+Tab (Mac)
  5. Search within a page: Ctrl+F (Windows) or Command+F (Mac)
  6. Open history: Ctrl+H (Windows) or Command+Y (Mac)

Windows Shortcuts:

  1. switch between windows: alt+tab
  2. Minimize all windows: Windows Key+D
  3. Open task manager: Ctrl+Shift+Esc
  4. Open File Explorer: Windows Key+E
  5. Take a screenshot: Windows Key+Print Screen

@Mohamud-coder
Copy link

waaaw

@gangothri-bryt
Copy link

Ctrl + G - Search for a line

@Abhinav-004
Copy link

very useful

@00Bipin
Copy link

00Bipin commented Sep 14, 2024

Thanks for providing us usefull important shortcuts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment