godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Allow disabling the built-in script editor when using an external script editor #2059

Open BenMcLean opened 3 years ago

BenMcLean commented 3 years ago

Describe the project you are working on

Wolfenstein 3-D VR remake https://github.com/BenMcLean/WOLF3D-Godot

Describe the problem or limitation you are having in your project

Godot keeps opening my C# scripts and saving over them when it shouldn't. I have to keep undoing the changes it makes to my code indentation. (of tabs vs spaces)

I don't want to use the Godot editor as a code editor. I use Visual Studio Community 2019. Yes, I know it's unsupported for now, but it has good accessibility features for my bad eyesight and all my plugins and addons. I use it daily for C# coding at work and just don't want to switch when it's time to code games.

I believe the problem I'm having would affect anyone using any unsupported code editor.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Godot should allow disabling code editing in the editor as an option.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Under Editor settings... -> Mono -> Editor -> External Editor, the "External Editor" setting should just be called "Code Editor" instead and the choice that's currently called "Disabled" should be called "Internal" and a new "Disabled" setting should simply not open anything when it's time to edit code.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not really.

Is there a reason why this should be core and not an add-on in the asset library?

It's part of the editor.

BenMcLean commented 3 years ago

I might mention that, on a more fundamental level, software shouldn't ever save over users files unless ordered to. Opening a file should never entail saving over it unless the user chooses to save. So if Godot behaved properly like any software should in this area, that would also solve my issue here.

Calinou commented 3 years ago

I have to keep undoing the changes it makes to my code indentation. (of tabs vs spaces)

Disable Convert Indent On Save in the Editor Settings.

BenMcLean commented 3 years ago

Disable Convert Indent On Save in the Editor Settings.

Oh hey thanks. That fixes that one annoyance but my proposal still seems like a good idea just on general principle.

lucypero commented 10 months ago

I might mention that, on a more fundamental level, software shouldn't ever save over users files unless ordered to. Opening a file should never entail saving over it unless the user chooses to save. So if Godot behaved properly like any software should in this area, that would also solve my issue here.

I strongly agree and this should still be fixed. It happened to me multiple times when the debugger outputs a runtime error, and it opens the script automatically on the Godot script editor, and it writes over all the changes you made on an external editor if you save the scene.

For now it seems like I solved it by disabling the Script Editor feature in Godot.

tmff commented 9 months ago

Im having issues with this as well. Disabling the script editor seems to completely remove the ability to open scripts though even in an external editor.

Cryszon commented 6 months ago

Im having issues with this as well. Disabling the script editor seems to completely remove the ability to open scripts though even in an external editor.

And even with script editor disabled, Godot still sometimes opens scripts in the background and saves over them forcing you to re-enable script editor in order to close them.

ambiguousname commented 3 months ago

Experiencing similar issues, Godot will randomly overwrite changes I've made in VSCode because it wants to open the scripts I'm working on and save them.

Calinou commented 3 months ago

Experiencing similar issues, Godot will randomly overwrite changes I've made in VSCode because it wants to open the scripts I'm working on and save them.

This is being tracked in https://github.com/godotengine/godot/issues/88399.