Godot version:
All
Issue description:
It would be convenient if the Godot editor could manage my project's licence text for me. Basically, I'd like to add or edit my licence text in ProjectSettings, and then have the editor add this automatically to files (*.gd at least, maybe others?) and hide it away while I'm editing the file.
I don't have any familiarity with how this is done in other editors, so other folks will have better ideas than me for implementation.
EDIT: Possible alternatives from comments:
Could be hidden away by supporting comment folding, and if a file starts with a long multiline comment, it would fold it by default?
Also careful not to overwite license text in addons/.
You can create custom script templates by placing files in the script_templates directory of the editor settings folder (create it if needed). The file must have an extension that matches the script language (.gd for GDScript, .cs for C#).
PS: You can open the editor settings folder using Editor > Open Editor Data/Settings Folder (Editor > Open Editor Settings Folder on Linux).
You can create custom script templates by placing files in the script_templates directory of the editor settings folder (create it if needed).
Makes me wonder whether editor plugins could write out script templates that way (per script class name, for instance), seems doable. But this would make more sense per project rather than editor.
I should probably learn to use script_templates, but I believe that would be a pain to use in a shared project since script_templates are not part of the project (https://github.com/godotengine/godot/issues/19145).
I agree with Zylann that any managed solution would have to respect addons or different parts of a project that might need different licence texts.
Yes, a simple option to fold all continuous text at the top of every file would work. I don't really mind the work of adding text; it's the scrolling past it that eats up my development time & attention.
I don't really mind the work of adding text; it's the scrolling past it that eats up my development time & attention.
You do realize that you can fold the license just like any part of your script by simply indenting it, right?


I think this is an unnecessary feature, I can't see how "Letting Godot handling your license" is an improvement for the engine, as mentioned in #28097. Tho, I do think that having templates in a per-project manner would be a good improvement, then people that like to put their licenses on their scripts can create a template for that, and also, it would allow for many other use cases.
Most helpful comment
You do realize that you can fold the license just like any part of your script by simply indenting it, right?


I think this is an unnecessary feature, I can't see how "Letting Godot handling your license" is an improvement for the engine, as mentioned in #28097. Tho, I do think that having templates in a per-project manner would be a good improvement, then people that like to put their licenses on their scripts can create a template for that, and also, it would allow for many other use cases.