0% found this document useful (0 votes)
91 views6 pages

The VsCode Shortcuts CheatSheet

Uploaded by

vema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views6 pages

The VsCode Shortcuts CheatSheet

Uploaded by

vema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

#_ the ( Visual Studio Code ) Shortcuts

1. General Shortcuts:

● Ctrl+Shift+P: Command Palette


● Ctrl+P: Quick Open
● Ctrl+Shift+N: New window/instance
● Ctrl+Shift+W: Close window/instance
● Ctrl+,: User Settings
● Ctrl+K Z: Zen Mode
● Ctrl+K M: Change file language
● Ctrl+N: New File
● Ctrl+O: Open File
● Ctrl+S: Save
● Ctrl+Shift+S: Save As
● Ctrl+W: Close File
● Ctrl+K W: Close All Files
● Ctrl+Shift+T: Reopen closed file
● Ctrl+Tab: Navigate through recently used files
● Ctrl+Shift+E: Focus on files explorer
● Ctrl+Shift+G: Focus on Source Control
● Ctrl+Shift+D: Focus on Debug sidebar
● Ctrl+Shift+X: Focus on extensions sidebar

2. Code Navigation:

● Ctrl+T: Show all Symbols


● Ctrl+G: Go to Line
● Ctrl+P: Go to File...
● Ctrl+Shift+O: Go to Symbol...
● Ctrl+F12: Go to Definition
● Alt+F12: Peek Definition
● Ctrl+K F12: Open Definition to the side

By: Waleed Mousa


● Ctrl+Shift+F10: Jump to matching bracket
● Ctrl+K Ctrl+Q: Jump back to the last edit location
● Ctrl+M: Toggle Tab moves focus

3. Code Editing:

● Ctrl+C: Copy (without selection)


● Ctrl+V: Paste
● Ctrl+X: Cut (without selection)
● Ctrl+Z: Undo
● Ctrl+Y: Redo
● Ctrl+/: Toggle Line Comment
● Ctrl+Shift+A: Toggle Block Comment
● Ctrl+K Ctrl+C: Add Line Comment
● Ctrl+K Ctrl+U: Remove Line Comment
● Alt+Up/Down: Move line up/down
● Shift+Alt+Up/Down: Duplicate line up/down
● Ctrl+Space: Trigger Suggest
● Ctrl+Shift+Space: Trigger Parameter Hints
● Ctrl+I: Select current line
● Ctrl+L: Cut current line
● Ctrl+Shift+K: Delete Line
● Ctrl+Backspace: Delete left word
● Ctrl+Delete: Delete right word

4. Find & Replace:

● Ctrl+F: Find
● Ctrl+H: Replace
● F3 / Shift+F3: Find next/previous
● Alt+Enter: Select all occurrences of Find match
● Ctrl+D: Add selection to next Find match
● Ctrl+K Ctrl+D: Move last selection to next Find match

By: Waleed Mousa


5. Multi-Cursor & Selection:

● Alt+Click: Insert Cursor


● Ctrl+Alt+Down: Insert Cursor Below
● Ctrl+Alt+Up: Insert Cursor Above
● Ctrl+U: Undo last cursor operation
● Shift+Alt+I: Insert cursor at end of each line selected
● Ctrl+L: Select current line
● Ctrl+Shift+L: Select all instances of current selection
● Ctrl+F2: Select all occurrences of current word

6. Integrated Terminal:

● Ctrl+`: Show/hide terminal


● Ctrl+Shift+`: New terminal
● Ctrl+C: Copy in terminal (when text is selected)
● Ctrl+V: Paste in terminal
● Ctrl+Up/Down: Scroll up/down in terminal
● Ctrl+Shift+Up/Down: Scroll page up/down in terminal

7. Debugging:

● F9: Toggle breakpoint


● F5: Start/Continue
● Shift+F5: Stop
● F11 / Shift+F11: Step into/Step out
● F10: Step over
● Ctrl+K Ctrl+I: Show hover

8. Git Integration:

● Ctrl+Shift+G: Open Source Control pane

By: Waleed Mousa


● Ctrl+Shift+G G: Focus on Git view
● Ctrl+Shift+G H: Focus on GitHub view
● Ctrl+Enter: Commit (from Source Control pane)
● Ctrl+Alt+Z: View Changes
● Ctrl+Alt+D D: Open Changes

9. Extensions & Marketplace:

● Ctrl+Shift+X: Open Extensions pane


● Ctrl+Shift+L: Show extensions for the current file
● Ctrl+Shift+V: Open Markdown preview
● Ctrl+K V: Open Markdown preview to the side

10. Python:

(Ensure you have the Python extension by Microsoft installed)

1. Shift+Enter: Run Python in the terminal.


2. Alt+Enter: Run the current file in Python terminal.
3. Ctrl+Shift+Test: Run tests in the current file.
4. Ctrl+Shift+D, P: Debug Python file in terminal.
5. F12: Go to definition (especially useful for functions).
6. Alt+Shift+R: Refactor code.
7. Ctrl+Shift+L: Linting options.

11. JavaScript:

1. Ctrl+Space: Trigger JavaScript suggestions.


2. F12: Go to the definition of a function or variable.
3. Shift+F12: Show all references to a function or variable.
4. Ctrl+Shift+O, :: Go to a specific method in the file.
5. Ctrl+K, Ctrl+I: Show information on the hovered-over symbol.

By: Waleed Mousa


12. Java:

(Ensure you have the 'Java Extension Pack' installed)

1. F12: Go to the definition of a class, method, or variable.


2. Shift+F12: Show references.
3. Ctrl+Alt+H: Call Hierarchy.
4. Ctrl+Shift+T: Navigate to a symbol's declaration.
5. Ctrl+Shift+O: Go to a symbol in the file.
6. Alt+Shift+F: Format the document.
7. Alt+Shift+Z: Surround with (like try/catch).
8. Ctrl+Shift+G, G: Show Git changes.

13. TypeScript:

1. F12: Go to definition.
2. Shift+Alt+F: Format the document.
3. Ctrl+Space: Get TypeScript suggestions.
4. Ctrl+Shift+X: Show fixes for the current error.
5. F2: Rename a symbol.
6. Ctrl+K, Ctrl+I: Hover information.
7. Ctrl+Shift+O: Navigate to a symbol's declaration in the file.

14. General Tips:

● Customize Keybindings: You can modify keybindings by opening


command palette and typing “Preferences: Open Keyboard Shortcuts”.
● Zen Mode: You can work without any distraction by toggling the Zen
mode.
● Code Snippets: Utilize code snippets to quickly insert patterns
and constructs into your code.
● Tasks: Automate tasks using the tasks.json file in the .vscode
folder.
● Docker Integration: Manage Docker containers directly from VSCode.
By: Waleed Mousa
● Jupyter Notebook Integration: You can edit and run Jupyter
notebooks in VSCode.
● Version Control with Git: Track changes, commit, and push code to
your Git repositories.
● IntelliSense: Utilize IntelliSense for smart code completions
based on variable types, function definitions, and imported
modules.
● Debugger: Use the powerful debugger which supports many languages
and is highly configurable.
● Themes & Icon Packs: Customize your VSCode instance with themes
and icon packs.
● Markdown & AsciiDoc: Write documentation using Markdown or
AsciiDoc with live preview.
● REST Client: Use REST client extension to send HTTP requests
directly from your editor.
● Database Management: Manage databases directly from your editor
with the right extensions.
● Keymap Extensions: If you’re transitioning from another editor,
you can install a keymap extension that maps your old editor’s
shortcuts to VSCode’s equivalents.

By: Waleed Mousa

You might also like