Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

searching multiple files in sublime text?

I'm trying to locate every instance of an expression in an open source project. Sublime text lets me do a search within a file for an expression like this with command F (on a Mac)

socket.on('api:admin.user.makeAdmin..

and SublimeText also lets me search for the names of files in the project but I don't know how to search multiple files for an expression that might occur anywhere. Since, for example, a socket can be listening for an emit anywhere in a project, it's hard to track down where the listeners are. However, this question obviously applies to more situations than that one example. If I can't do it with SublimeText is there another way to do it?

like image 551
Leahcim Avatar asked Oct 03 '22 02:10

Leahcim


2 Answers

You're looking for Find In Files. Activate it with ctrl + shift + F.

like image 186
Marco Lavagnino Avatar answered Oct 13 '22 11:10

Marco Lavagnino


Sublime also has Find In Files where you specify a directory and can include subdirectories as well. So for Find you type in the text you are looking for. In Where you select the root project folder, then it will search all subfolders and files for your string entered in Find. There is also a Replace entry which you can use as well.

like image 44
David Yenglin Avatar answered Oct 13 '22 12:10

David Yenglin