Navigation - Find All / Replace All - Beta

Hi Developers,

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.

Happy navigating!

Many thanks to @IcyTides, @altisaltaccount, @Regal_Corgi, @iriszh, and @windy0724 for getting us here!

373 Likes

This topic was automatically opened after 14 minutes.

This is amazing!

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 image (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.

21 Likes

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.

So thank you so much for the add!

77 Likes

I like the update it’s good :+1:

it’d be nice to make the window a bit more informative like so

image
(from VS Code)

I think copying borrowing ideas / features from VS Code and other code editors wouldn’t hurt in general

12 Likes

This is something I’ve wanted for a bit. This will make modifying my older scripts quicker and less of a hassle.

2 Likes

This is going to be incredibly handy for trying to fix up old games with loads and, loads of random scripts…

heh couldn’t be me man, never had a game with loads of scripts ever hehe

so gaming good

jk

this is very helpfull for stuff especially if you have multiple scripts that have a line wich doesnt work and boom u can remove it fast

1 Like

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

2 Likes

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! :grinning_face_with_smiling_eyes:

1 Like

This is GREAT! I finally don’t need to search EVERY…SINGLE…SCRIPT just for 1 line!

1 Like

Very useful feature, it makes things easier when you have to edit something in multiple scripts!

1 Like

I’m glad this is now a thing. Will it be possible in the future to only query strings or only query function names, etc?

2 Likes

YES!!! Thank you so much for this!

2 Likes

Can we get multiline cursors, next?

1 Like

O…M…G…

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.
image


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.
image


That sure is a lot of scripts…
image

6 Likes

This would be incredibly helpful to mass replace animation ids in my place. Great work Roblox!

3 Likes

YESSSSSS!!! FINALLY THOSE OLD DAYS OF SELECTING 1 By 1 ARE GONE now i can save 6 minutes of making a game :slight_smile:

2 Likes

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.

4 Likes

I love this so much!

This one thing is bothering me and I don’t know why lol:

image

Why is the tab called Find/Replace Window? Shouldn’t it just be called Find and Replace?

4 Likes