Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code search only selected lines

Trying to figure out how to only search text within selected lines in visual studio code (version 1.17.2). I see lots of other options but not this which surely must be there.

Suggestions appreciated.

like image 787
colinbes Avatar asked Oct 18 '17 16:10

colinbes


People also ask

How do you find a specific line in a VS Code?

Go To Line dialog box To access this dialog box, open a document for editing, and then select Edit > Go To > Go To Line or press Ctrl+G.

How do you filter lines in VS Code?

Filter line by input regex.Open Command Palette (⇧⌘P) and type FilterLine , select Filter Line By Input Regex in the list. Type a regular expression and hit <Enter> . The extension will output matching lines in a new file with postfix . filterline.

How do you select multiple lines of code?

Windows: Ctrl + Alt + Arrow Keys. Linux: Shift + Alt + Arrow Keys. Mac: Opt + Cmd + Arrow Keys.


1 Answers

settings.json Ctrl+,

"editor.find.autoFindInSelection": "multiline" | "always"
  1. Select text
  2. Search will look in the selected text
like image 161
Alex Avatar answered Sep 26 '22 17:09

Alex