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
Describe the problem or limitation you are having in your project
In the GDscript Editor if you select a section of code and comment using the shortcut keys like Ctrl+/ or Ctrl+K (windows).
the following happens
The code
funcsome_func():
vary :int=0# some changes to yforxin10:
y+=x*2
the commented code
#func some_func():##var y :int = 0### some changes to y#for x in 10:#y += x * 2##print(y)
The code commented is not proper to read for everybody. And also commenting the empty line within the code should be optional.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Settings in Editor Settings
An option needs to be added for code commenting in Editor settings to select the VSCode style code commenting as code commented in VScode and code commented in GDscript editor are different.
This setting will give an option to select the way code is commented
Default style - current style
Lowest Indent Style - It will comment based on the lowest indented line like in VScode. Examples given below
Commenting in Code
When code is commented using lowest indent style, the code comment header will start from the selected lines lowest indent line.
# func some_func():# var y :int = 0# # some changes to y# for x in 10:# y += x * 2# print(y)
Similar proposal I have created, in Godot, regarding code commenting godotengine#8211
Adding an extra whitespace after the Commnet line header be optional
Provide a setting to toggle adding a space after the comment line header
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Here are some examples of code commented using Lowest Indent Style
## Example 1 - When first line is lowest indent (func line)# func some_func():# var y :int = 0# for x in 10:# y += x * 2## print(y)## Possibility 2 - When first line is lowest indent (for loop) inside another scopefuncsome_func():
vary :int=0# for x in 10:# y += x * 2## print(y)## Possibility 3 - When first line is not lowest indent (assignment line)funcsome_func():
vary :int=0forxin10:
# y += x * 2## print(y)
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is used often if you use the in-built editor for scripting. No workaround.
Is there a reason why this should be core and not an add-on in the asset library?
GDscript editor is part of the Core engine modules
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Multiple Projects in 4.3.beta 2
Describe the problem or limitation you are having in your project
In the GDscript Editor if you select a section of code and comment using the shortcut keys like Ctrl+/ or Ctrl+K (windows).
the following happens
The code
the commented code
The code commented is not proper to read for everybody. And also commenting the empty line within the code should be optional.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Settings in Editor Settings
An option needs to be added for code commenting in Editor settings to select the VSCode style code commenting as code commented in VScode and code commented in GDscript editor are different.
This setting will give an option to select the way code is commented
Commenting in Code
When code is commented using lowest indent style, the code comment header will start from the selected lines lowest indent line.
Similar proposal I have created, in Godot, regarding code commenting godotengine#8211
Adding an extra whitespace after the Commnet line header be optional
Provide a setting to toggle adding a space after the comment line header
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Here are some examples of code commented using Lowest Indent Style
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is used often if you use the in-built editor for scripting. No workaround.
Is there a reason why this should be core and not an add-on in the asset library?
GDscript editor is part of the Core engine modules
The text was updated successfully, but these errors were encountered: