DEV Community

GaMa
GaMa

Posted on

Visual Studio Code Cheat Sheet

I will update this post as I found shortcuts in vscode that I consider might be useful :)

Select and edit text based on a regex

  1. Ctrl+F : Open find widget.
  2. Alt+R : Turn on regex mode.
  3. Input search text : Regex text or normal text.
  4. Alt+Enter : Select all matches.
  5. Left arrow : Adjust cursors. (Ignore this step if you don't want to edit the selected text.)
  6. Edit text : Do what you want.(Ignore this step if you don't want to edit the selected text.)
  7. Shift+Home : Select modified text.(Ignore this step if you don't want to edit the selected text.)
  8. Ctrl+C : Copy selected text.
  9. Ctrl+N : Open a new tab.
  10. Ctrl+V : Paste.

Example

Compare files

  1. Open the first file to compare.
  2. ⌘ + ⇧ + P to bring the menu
  3. Type: Files: Compare Active File With...
  4. Select the file to compare to.

Top comments (1)

Collapse
 
abrandao profile image
Anderson Brandão

Some keybinds I like:

Ctrl+Delete to delete a word.
Ctrl+P to find a file or folder (That's amazing).
Ctrl+B toggle sidebar.
Ctrl+Home go to begining of file.
Ctrl+End got to end of file.