I’m used to
CTRL + SHIFT + F in VSCode and I mistakenly pressed those keys while in the PlayCanvas script editor to find you can search across all files! I never realized that was a thing. Awesome!
I’m used to
There’s a couple of hidden shortcuts in the Editor too. Ctrl + D is one of my favourites to help with multi-selecting words
I kinda knew about it. It’s very useful once you learn about it.
CTRL + P to search scripts in the code editor
Why they are hidden? Maybe they can be add on the page below?
Hidden as not obvious from the Editor. It’s on the shortcut list but people have to know about the manual etc.
There is a shortcut/help panel but again, not super obvious:
We have a feature request to make the shortcuts visible from the Editor: Add shortcuts/hotkeys to options menu to make it easier to learn them · Issue #513 · playcanvas/editor · GitHub
That are shortcuts for the editor itself, but is there also a list of shortcuts for the code editor?
It’s better in the Code Editor as the shortcuts are in the options menus:
Great! That list can then be updated with the shortcuts of this topic. I regularly went through all scripts to change a name of a certain variable, so that shortcut saves a lot of work. Following on from that, what is the easiest way to quickly rename the highlighted variable?
this.moveSpeed, press Ctrl + D to select next match, start typing but that only works for one file
There isn’t a global find and replace yet unfortunately.
It seems you can’t do anything on this result page. If you change anything this won’t be applied. Despite that, it is useful to see where something is used.
Right, it is not meant for editing. The useful part is you can double click the found line and it will jump to that file/line, while still keeping your search results in a separate tab. This way you can jump to multiple places quickly and edit where needed in place.
It opens in the same tab for me, so I lost the search results. Is there a setting I need to change?
No settings, it opens in a new Editor tab (not the window tab).
Yesterday when I tried it was opening in the same Find Result tab. So the Find Result tab was gone. Today I tried again and it does indeed open in a new tab. I’m curious what will happen if I later really want to use it.