28

I am looking for a similar way that I work in Sublime Text:

Find All for a specific regular expression. Then it has multiple-selected the texts I need.

A simple find and replace does not fulfil my needs. I need to move the cursors to some segment in the lines to edit.

I m on Windows.

chingNotCHing
  • 1,196
  • 8
  • 13

1 Answers1

49

Windows & Linux

Per an answer to this StackOverflow Question:

  • Do a normal Find ( Ctrl + F ) using regular expressions.

Visual Studio Code RegEx Find

  • Press Alt + Enter to select all the Find matches. This will insert multiple cursors at the end of each occurrence.

  • Use the Left Arrow and Right Arrow keys to move the synced cursors within each selection.

  • Edit selections as necessary.

Official Keyboard Shortcut List For Visual Studio Code On Windows
Official Keyboard Shortcut List For Visual Studio Code On Linux


macOS

  • Do a normal Find ( ⌘ Cmd + F ) using regular expressions.

  • Press ⌥ Option + Enter to select all the Find matches. This will insert multiple cursors at the end of each occurrence.

Official Keyboard Shortcut List For Visual Studio Code On macOS

mrienstra
  • 113
  • 4
Anaksunaman
  • 16,718
  • 4
  • 38
  • 45