Description
Describe the project you are working on
A 2d cooking game where a lot of the code is written in GDScript 2.0.
Describe the problem or limitation you are having in your project
Writing code with the script editor. There are too many scripts open at all times after a while. Also, it's hard sometimes to look where the script is in the FileSystem.
Right now, I search the script name to limit the amount of scripts shown in the left tab.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
- If you open a script in the ScriptEditor, it would be nice to automatically select that script in the FileSystem(Show in FileSystem button, but automatically done).

- Also, if you open a first script but don't do any changes to it and then open a second script, it would be nice to close the first script. If you would want the first script open, you could double click it in the Script Editor(similar to how visual studio code does it with open but only for visualising the script open).
- If you open a scene, it automatically opens a script for some reason, even though I did not select that script. While this could be nice, it would be kinda cool if again it opened it in a sort of temporary state, for visualising only, and if you wanted it open, to have a way to pin it by double clicking it's name, and if not, when you open another script or select another scene, to close it and open the new script.
- Documentation is also shown in Script Editor, which is ok, but again it kinda clutters a lot the tab view. Same as with 2 and 3, it would be nice if you only open a documentation tab and then go back, to have it closed. Also, if you open documentation page called
Polygon2D
and then open page calledNode2D
, unless you specifically pinned thePolygon2D
documentation page, to have it closed in the tab and only show theNode2D
tab. And then, if you click the back button twice, it should first close theNode2D
tab and open aPolygon2D
tab(again, if not pinned), and the second time close thePolygon2D
tab and go back to the script tab. - A close button for scripts tab items wouldn't hurt.

Right now, if I just open 4-5 scenes to check one thing, it opens 4-5 scripts also, and I have to close them. After a while, you give up closing them and embrace that you have at all times 100x scripts open, and use the search feature. Which beats the purpose.
If I just look at the documentation and look at 4-5 pages, it opens 4-5 pages in the Script Editor, which is kinda not cool.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
-
Have a pin button or have the script name be in italic if it's open only for view and double click it to be normal text(opened for edit and not open for view).
If it's open for view, it should be replaced with anything other that is opened afterwards.
Eg. if you have a script A opened for viewing only, and then open script B, script A is closed and script B is shown.
If script B is opened for view, same case. If script B is opened for edit(by double clicking the script in the file system) then it stays open. -
The last part of this is the file selection in FileSystem. If the script is open for editing, it would be very nice to have it synced with the FileSystem view so you see where the file is. This could be extended to other editors as well, eg if you select and open an image in the Inspector view, have it select the corresponding file in FileSystem view.
-
Again, a close button for the scripts tabs items would be cool. Similar to how scenes have a close button.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Maybe it could be an add-on, but I feel like many more people have this problem, as it's very different from how very popular editors work, eg. Visual Studio Code.
Is there a reason why this should be core and not an add-on in the asset library?
Just that it's such an important feature and everyone could benefit from this.
Activity