Sublime Forum

How to find code/text in all project files?

#1

Hi

I’ve managed to find my way around the GoToAnything file - but is it possible to find a piece of text/code in all the project files?

Say for example that I have lots of css files and I am looking for img.logo in all the files?

Thanks

0 Likes

#2

If you have the project open, just use “ctrl + shift + f” (windows key bindings, I don’t know the other OS key bindings) to bring up the “find in files” panel at the bottom of the screen.
Type your search string into the “Find” text input and make sure the “Where” input says “” and press the “Find” button.
It should then search all files in your open project for your search string.

0 Likes

#3

Thanks @Lemon - that works great.

When the search results come back, I keep having to go back to the Find Results page to open each result individually.

Is it possible to ‘open all search result files’ in the tabs?

0 Likes

#4

I don’t know of any way to open all search results in new tabs automatically, but when you are shown your search results you can use “F4” to cycle to the next search result and “Shift + F4” to Cycle to the previous search result.

As it goes to each search result it will automatically open the relevant file in a new tab if required.

0 Likes

#5

There is also “goto_symbol_in_project” (“ctrl+shift+r”). Not sure how this works for CSS but for code it is great.

0 Likes