35

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.

1 Answers1

58

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
  • 123
Anaksunaman
  • 18,227