Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find 'Find All refernces' in current file only with visual studio code?

when i hit Find All References it try to find all reference in files inside workspace.

i want to use current file only when search 'Find all reference' function in vs code.

enter image description here

i want to search only References in yellow marked file which is currently editing file and don't want to search files all other files like purple X marked area.

like image 489
jeon Avatar asked Oct 23 '25 13:10

jeon


2 Answers

  1. Open the find feature with Ctrl + f (or Cmd + f on mac)
  2. Enter the search term and configure your desired case sensitivity/regex usage
  3. Press Ctrl + Shift + L (or Cmd + Shift + L on mac)

All occurrences in the open file will be selected. Press Esc to return focus to the editor.

like image 173
hughes Avatar answered Oct 27 '25 03:10

hughes


  • ctrl + shift + f will open search.

  • Click on the 3 dots (Toggle search details) under search dialog box. [ ... ]

  • Under file to include, specify the path of the file under which you want to find all the references to the key you're searching.

like image 30
Shishir Samani Avatar answered Oct 27 '25 02:10

Shishir Samani