6

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.

16

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.