Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select all find matches within selection?

In Visual Studio Code, I am searching for a regular expression and have enabled "find in selection". Now I want to select all the matches that I found. My problem is that if I use "Select all occurrences of find match" from the command palette, then it repeats the search for the entire file and selects all of those occurrences.

How do I limit "Select all occurrences of find match" to only the matches that were within my original selection?

like image 321
flodin Avatar asked Apr 13 '18 06:04

flodin


People also ask

How do you select all occurrences?

Do you want to select all the occurrences of a piece of code? How to use: Press Ctrl + Alt + Shift + J on Windows/Linux, and ⌘ + ^ + G on macOS.

How do you select all occurrences of a word in VSCode?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.

How do I select all occurrences in Visual Studio?

Ctrl + Shift + L to select all occurrences of current selection.


1 Answers

Use editor.action.selectAllMatches : currently bound to Alt-Enter

like image 168
Mark Avatar answered Oct 23 '22 13:10

Mark