Visual Studio Code Cheatsheet
#
Visual Studio Code (VSCode) is a popular, lightweight code editor with extensive features and support for a variety of programming languages.
Basic Navigation
#
Command/Option | Example | Description |
---|
Ctrl + P | Ctrl + P | Quick open files by name |
Ctrl + Shift + P | Ctrl + Shift + P | Open the Command Palette |
Ctrl + Shift + O | Ctrl + Shift + O | Go to symbol in file |
Ctrl + G | Ctrl + G | Go to line number |
Ctrl + B | Ctrl + B | Toggle sidebar visibility |
Ctrl + J | Ctrl + J | Toggle the integrated terminal |
Ctrl + Tab | Ctrl + Tab | Switch between open files |
Editing Code
#
Command/Option | Example | Description |
---|
Ctrl + C | Ctrl + C | Copy selected text |
Ctrl + X | Ctrl + X | Cut selected text |
Ctrl + V | Ctrl + V | Paste text from clipboard |
Ctrl + Z | Ctrl + Z | Undo last action |
Ctrl + Y | Ctrl + Y | Redo last undone action |
Alt + Up | Alt + Up | Move line up |
Alt + Down | Alt + Down | Move line down |
Ctrl + / | Ctrl + / | Toggle line comment |
Ctrl + Shift + A | Ctrl + Shift + A | Toggle block comment |
Searching and Replacing
#
Command/Option | Example | Description |
---|
Ctrl + F | Ctrl + F search_term | Find text in the current file |
Ctrl + H | Ctrl + H old_text | Replace text in the current file |
F3 | F3 | Find next occurrence of search term |
Shift + F3 | Shift + F3 | Find previous occurrence of search term |
File Management
#
Command/Option | Example | Description |
---|
Ctrl + N | Ctrl + N | New file |
Ctrl + S | Ctrl + S | Save file |
Ctrl + Shift + S | Ctrl + Shift + S | Save As |
Ctrl + W | Ctrl + W | Close current file |
Ctrl + Shift + T | Ctrl + Shift + T | Reopen closed file |
Ctrl + K Ctrl + S | Ctrl + K Ctrl + S | Open keyboard shortcuts |
Integrated Terminal
#
Command/Option | Example | Description |
---|
Ctrl + \ | Ctrl + \ | Split terminal |
Ctrl + Shift + \ | Ctrl + Shift + \ | Toggle terminal panel |
Ctrl + C | Ctrl + C | Copy selection in terminal |
Ctrl + V | Ctrl + V | Paste into terminal |
Ctrl + Shift + C | Ctrl + Shift + C | Copy selection from terminal |
Extensions and Customization
#
Command/Option | Example | Description |
---|
Ctrl + Shift + X | Ctrl + Shift + X | Open Extensions view |
Ctrl + Shift + P | Ctrl + Shift + P | Open Command Palette to access extension commands |
Ctrl + , | Ctrl + , | Open settings |
Ctrl + K Ctrl + S | Ctrl + K Ctrl + S | Open keyboard shortcuts editor |
Debugging
#
Command/Option | Example | Description |
---|
F5 | F5 | Start debugging |
F9 | F9 | Toggle breakpoint |
F10 | F10 | Step over |
F11 | F11 | Step into |
Shift + F11 | Shift + F11 | Step out |
This cheatsheet covers the essential Visual Studio Code commands and options to help you navigate, edit, and manage your code efficiently in VSCode.