Have you ever tried to find “the Noob” in all your Scripts? It’s hard! And if you wanted to upgrade every “the Noob” to “the Pro”, there wasn’t a convenient way to do it. Well, no longer! With this release, an overhauled Find All widget adds convenient navigation across your entire Place and adds slick Replace / Replace All functionality.
Unified Search and Results
The old Find All widget had separate windows for search input and viewing results. This was inconvenient as the search window kept disappearing and did not allow quick refinement of queries. The new UI unifies input and results, enabling you to quickly hone in on the “droids” you are looking for.
Search queries can be additionally refined by using the Filter Bar. Entering a path will limit search to that location.
Replace / Replace All
What is Find without Replace? Easily replace all uses of a value throughout your codebase, either carefully, one at a time, or by living dangerously with Replace All. Refactoring has never been easier or more exciting.
Replacing counts as an edit of your Script. When editing in Team Create, you can expect the following behavior:
With Collaborative Editing ON, Replace will create a new draft
With Collaborative Editing OFF, Replace will attempt to open the Script in the background and apply the edit
If no other users are editing the Script, this operation will succeed
If another user is editing the Script, this operation will fail and you will be informed
Dynamic Find
Search results in the new Find All widget will never be out of date! The results update whenever any Script in your Place updates.
Keyboard Navigation
Ah, the keyboard. Fly around your codebase without ever touching the mouse. Tab moves between inputs, arrow keys to navigate results, enter to jump directly into a script at the location found.
But, it’d be great to also use basic string patterns and escape sequences (and some way to literalize them, too). For example, replace double new-lines with one (\n\n → \n). Or you can simply find (not replace) pieces of code with a string pattern (%a+%d useful for variable names like object34, etc.). Right now, VSCode allows this with a togglable button (for regex) where turning it off would literalize the string patterns and escape sequences. I’d love to have this functionality in Studio as well.
Edit: Oops, didn’t realize there is .* button already. But doesn’t allow string patterns yet.
Yeah…it’s pretty relatable when you try to find the noob…
In all seriousness, these features will prove very beneficial for future projects. I’m working with a lot of scripts in a more recent collab and NEED this feature.
An update like this was long due by many scripters on the platform, especially the Replace all feature if you have TONS of repetition in your game, now I don’t have to manually go through every script that needs to be changed one by one if I ever have to do that again which hopefully I don’t if I control the repetition haha. I’m glad to see that Script Navigation finally get an overhaul after all these years where it was only just Find All and a confusing list.
I hope that in the future you guys also bring more light to reducing clutter on the script tabs, because it still has issues with how much space a script can take, especially if its’ disabled or someone’s editting it haha
It’s nice to see more work put into improving the contents of the script editor aswell as script utilities. It’ll be much more efficient to use find all and now finally replace all!
Really Really Really great update! No more needing to click through all the finds and replacing them manually!
However, I really think searching and replacing in CoreGui should be disabled, and a setting can turn it back on.
Edit:
Currently, when you replace all, the scripts open. Can there be a tick box saying “Open all scripts”, because sometimes, I don’t want to open up all scripts just to close them.
There is already an existing .* pattern matching toggle on the find button. I’m not sure if it works with replace though, I think historically it hasn’t in Studio.