Find and replace in Visual Studio code in a selection

I was able to get it to work but the workflow is poor:

  1. control + H to open Find/Replace
  2. Select your line of text
  3. Click the “Find in selection” icon to the right Alt L or L on macOS)
  4. Enter your find and replace characters in their inputs
  5. Click the Replace all icon

It works but you have to go through the workflow all over again for each new selection (except for CTR + H of course). BTW I have the exact same behavior in Sublime Text.

Could you go with a regExp to find your lines? Do they contain only .’s and 1’s?

Leave a Comment