Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot edit built-in script if external editor is enabled #29863

Closed
marcospb19 opened this issue Jun 18, 2019 · 7 comments · Fixed by #54578
Closed

Cannot edit built-in script if external editor is enabled #29863

marcospb19 opened this issue Jun 18, 2019 · 7 comments · Fixed by #54578

Comments

@marcospb19
Copy link
Contributor

marcospb19 commented Jun 18, 2019

Godot version:
3.1 and 3.2

OS/device including version:
Windows 10 and Manjaro Linux.

Issue description:
If external editor is enabled, the built-in script cannot be edited in any way.

Expected:
Godot opens the built-in script on the external editor or the embedded editor.

Steps to reproduce:

  1. On a new project
  2. Go to Editor -> Editor Settings -> Text Editor -> External.
  3. Check the checkbox "Use External Editor".
  4. Type "/usr/bin/subl" inside of "Exec Path".
  5. Click on "close".
  6. Attach a built-in script to a new Node.
@marcospb19
Copy link
Contributor Author

marcospb19 commented Jun 18, 2019

Issue has been already reported on #29662, but I did not noticed this only happens with built-in scripts, so a commit fixed another issue there with Exec Flags stuff.

Then I reopened this issue with the fixed problem description.

@marcospb19
Copy link
Contributor Author

We might need to discuss the expected behavior, as the built-in script is written inside of a scene file the easiest fixes are just open the file on the embedded editor and ignore the external editor option.

Or just open the scene file on the external editor (this could lead to many problems, if the scene is saved from any editor).

Also, a checkbox can choose one of those 2 options above.

@marcospb19
Copy link
Contributor Author

marcospb19 commented Jun 18, 2019

A perfect integration with external editors and built-in scripts would be if Godot creates a temporary file representing the built-in script within the scene file, and pass this file to the external editor, so Godot may monitor this file and continuous maintain synchronization between editors.

I don't know if this is desirable or just too much (4.0?).

@qarlosh
Copy link

qarlosh commented Nov 19, 2019

If "Use External Editor" is activated, when trying to edit a built-in script, this is opened using the Godot code editor, but it doesn't switch to the Script Workspace automatically. I think that fixing it should be enough.

@marcospb19
Copy link
Contributor Author

marcospb19 commented Apr 3, 2020

@qarlosh to me it does not open in the Godot Code Editor.

Can you test it again and confirm this behavior?

@qarlosh
Copy link

qarlosh commented Apr 4, 2020

@marcospb19 , I confirm the behavior in 3.2stable, using Linux Mint 64 bits. "Use External Editor" is activated and correctly configured with VS Code. If I try to open a built-in script, it opens in the Godot editor, but it doesn't switch to Script Workspace, I have to press F3 to see it.
Script files open correctly with VS Code.

@marcospb19
Copy link
Contributor Author

Here it behaves differently.

Using 3.2.1 Stable on Arch Linux 64 bits, with "Use External Editor" enabled to open in nvim, sublime text (subl), or Visual Studio Code (code), with and without Exec Flags, the script DOES NOT open in the Godot Script editor, it's empty for me.

This difference information is important and should investigated when solving the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants