You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The relevant aspect of the project is that the built-in script editor is the primary method of interacting with scripts.
Describe the problem or limitation you are having in your project
Often when working on complex code, stray newlines will make their way into a script at the end of the file. Sometimes these lines go uncaught and get committed into the repo.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding trim_final_newlines_on_save setting will help to clean up any stray newlines.
This helps to ensure the code cleanliness while interacting with the built-in editor. This would help ensure parity with other editors like Visual Studio Code (trimFinalNewlines).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If trim_final_newlines_on_save is enabled and a user saves a script, it will remove any newlines after the final newline of the file.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This can be worked around with an editor plugin, but it is a general quality of life improvement to the script editor.
Is there a reason why this should be core and not an add-on in the asset library?
It fits with the current trim_whitespace_on_save setting that is already present.
The text was updated successfully, but these errors were encountered:
bitwise-aiden
changed the title
Add trim_final_newlines_on_save and insert_final_newline_on_save settings
Add trim_final_newlines_on_save settings
Jan 12, 2024
Describe the project you are working on
The relevant aspect of the project is that the built-in script editor is the primary method of interacting with scripts.
Describe the problem or limitation you are having in your project
Often when working on complex code, stray newlines will make their way into a script at the end of the file. Sometimes these lines go uncaught and get committed into the repo.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
trim_final_newlines_on_save
setting will help to clean up any stray newlines.This helps to ensure the code cleanliness while interacting with the built-in editor. This would help ensure parity with other editors like Visual Studio Code (trimFinalNewlines).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
trim_final_newlines_on_save
is enabled and a user saves a script, it will remove any newlines after the final newline of the file.If this enhancement will not be used often, can it be worked around with a few lines of script?
This can be worked around with an editor plugin, but it is a general quality of life improvement to the script editor.
Is there a reason why this should be core and not an add-on in the asset library?
It fits with the current
trim_whitespace_on_save
setting that is already present.The text was updated successfully, but these errors were encountered: