godot-docs
godot-docs copied to clipboard
Open editor with a script
Use a scripting language to start the external editor (or anything else).
The script (and shebang behavior) is not tested on linux and macOS.
I think it'd be better to use a Python script for this, rather than GDScript. This way, it doesn't rely on the current Godot version installed on the system (and suffer from any bugs it may have). This will probably be a bit faster as well, and it won't require hacks related to the window size.
@Calinou I don't know how many users have python avaible; For Windows it is not avaible by default. I could change the code block to have different tabs for Python, GDScript, (Node JS?, Deno TS?), so everyone can choose the preferred langauge.
@Calinou I don't know how many users have python avaible; For Windows it is not avaible by default. I could change the code block to have different tabs for Python, GDScript, (Node JS?, Deno TS?), so everyone can choose the preferred langauge.
We shouldn't spend too much time maintaining this kind of script, so I'd vouch for including only a Python script. Installing Python on Windows is relatively straightforward by now, as long as the script only uses packages available within the standard library (no pip packages).
I wrote the scripts for Python, Javascript (Node) and Typescript (Deno); They all only use the standard library. One of the languages should always be avaible.
FYI, I made a script similar to @antonWetzel (in Python) back on https://github.com/godotengine/godot-proposals/issues/4476 and I just published a blog about it: https://www.snopekgames.com/tutorial/2022/how-make-godot-open-vs-code-workspace-if-project-has-one
Given how much personal preference is connected with the scripting language used AND the rules for deciding what workspace to open (I use slightly different rules than @antonWetzel because I sometimes put my *.code-workspace files in the .vscode directory to keep things tidy), I'm a little skeptical of trying to put the actual script in the official docs. This might be better in a place where folks can post comments and discuss?
Closed because low interrest. See https://www.snopekgames.com/tutorial/2022/how-make-godot-open-vs-code-workspace-if-project-has-one for solution