-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Detect current indentation style before converting indentation in the script editor #6250
Comments
I would give the implementation a try but I think there should be some sort of consent on this before I invest the time. |
I want to add a +1 for this, Godot formatting (some) of a yaml file with tabs instead of spaces can make it quite difficult to track down why a config suddenly isn't working 👍 |
This comment was marked as off-topic.
This comment was marked as off-topic.
@tlaine Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Describe the project you are working on
A python tool that analyzes GDScript and uses a yaml file for configuration.
Describe the problem or limitation you are having in your project
The configuration file beeing a yaml file means it cannot be changed from the godot editor. This is the case because yaml will not accept tabs as indentation. When saving the file godot will convert the space based indents into tabs (with the default editor settings). When disabeling the
Convert Indent on Save
option the yaml file can be saved, but this functionality can be usefull when copying GDScript code.Describe the feature / enhancement and how it helps to overcome the problem or limitation
The
Convert Indent on Save
option should only effect GDScript files. When editing a text file the conversion should not happen. I consider it out of scope for the Godot code editor to provide the best edditing experience for files other than GDScript therefore implementing file type based settings is too complex.To improve editing of text files further it would also be good to make the
Auto Indent
option use some heuristic to determine the indent type of the current file instead of using theIndent
option. This would allow for broad use of the auto indent function.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Possible heuristic for determineing the indent type:
A
if it is samller then the current valueA
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't think so.
Is there a reason why this should be core and not an add-on in the asset library?
There is no way for an addon to implement this. (As far as i know.)
The text was updated successfully, but these errors were encountered: