Cheatsheets
Keyboard Shortcuts
30 entries
Keyboard Shortcuts
Essential keyboard shortcuts for VS Code, browsers, terminals, and operating systems
30 commands
CommandDescriptionExample
Ctrl+P / Cmd+P
VS Code: Quick open — search and open any file by name
Type 'app.tsx' to jump to itCtrl+Shift+P / Cmd+Shift+P
VS Code: Open the Command Palette to run any editor command
Type 'format' to find Format DocumentCtrl+` / Cmd+`
VS Code: Toggle the integrated terminal
Opens terminal in editorCtrl+B / Cmd+B
VS Code: Toggle the sidebar visibility
Hide sidebar for more editor spaceCtrl+Shift+F / Cmd+Shift+F
VS Code: Search across all files in the workspace
Search 'TODO' across workspaceAlt+Up / Option+Up
VS Code: Move the current line up
Swap current line with line aboveCtrl+D / Cmd+D
VS Code: Select the next occurrence of the current selection (multi-cursor)
Select 'div' then Ctrl+D to select next 'div'Ctrl+/ / Cmd+/
VS Code: Toggle line comment for the selected lines
Toggle // comment on selected linesF12
VS Code: Go to Definition of the symbol under the cursor
Jump to function definitionShift+Alt+F / Shift+Option+F
VS Code: Format the entire document using the configured formatter
Auto-format with PrettierCtrl+T / Cmd+T
Browser: Open a new tab
Open new tabCtrl+W / Cmd+W
Browser: Close the current tab
Close current tabCtrl+Shift+T / Cmd+Shift+T
Browser: Reopen the last closed tab
Reopen accidentally closed tabCtrl+L / Cmd+L
Browser: Focus the address bar to type a new URL
Type a URL directlyCtrl+Shift+I / Cmd+Option+I
Browser: Open Developer Tools
Opens Elements/Console panelCtrl+R / Cmd+R
Browser: Reload the current page
Refresh the pageCtrl+Shift+R / Cmd+Shift+R
Browser: Hard reload the page, bypassing cache
Bypass cache and reloadCtrl+C
Terminal: Send SIGINT to interrupt or cancel the current running process
Stop a running npm dev serverCtrl+Z
Terminal: Send SIGTSTP to suspend the current process to background
Suspend vim to return to shellCtrl+A
Terminal: Move cursor to the beginning of the line
Jump to start of commandCtrl+E
Terminal: Move cursor to the end of the line
Jump to end of commandCtrl+R
Terminal: Reverse-search through command history
Search: (reverse-i-search)`git`Ctrl+L
Terminal: Clear the terminal screen (equivalent to the 'clear' command)
Clear scrollbackAlt+. / Esc+.
Terminal: Insert the last argument of the previous command
Reuse last arg: mkdir foo → cd Alt+.Ctrl+Z / Cmd+Z
OS: Undo the last action in the current application
Undo last text editCtrl+Shift+Z / Cmd+Shift+Z
OS: Redo the last undone action
Redo last undoCtrl+X / Cmd+X
OS: Cut selected text or files to the clipboard
Cut selected textWin+D / Mission Control (Mac)
OS: Show or hide the desktop / Mission Control on macOS
Minimize all windowsAlt+Tab / Cmd+Tab
OS: Switch between open application windows
Switch to previous appWin+L / Ctrl+Cmd+Q
OS: Lock the screen (Windows: Win+L, macOS: Ctrl+Cmd+Q)
Lock screen when stepping away