Tabs and spaces in the G-code editor, encore
-
Re: [DWC 3.2](gcode editor issue)
Hi, I found the older topic referenced above mentioning that tabs should be replaced by spaces in the editor. However, while working intensively with conditional G-code/meta commands in the last couple of weeks (DWC 3.4.0 beta 5/6), I noticed this does not happen?
I have to manually check the code with Visual Studio Code (search for
\t
) to prevent RRF complaining that spaces and tabs are mixed.Take the following code as a start:
while {false} echo "Tab before line indent" echo "Selected line level 1 indent" echo "Selected line level 2 indent"
- When I put the cursor in front of line 2 and press
[Tab]
→ a tab character is inserted. - When I select line 3 with
[Shift]+[Down]
and press[Tab]
→ two spaces are inserted. - When I select line 4 with
[Shift]+[Down]
and press[Tab]
twice → a tab character is inserted.
So it looks like this now:
I would like that the built-in DWC editor converts indents into either spaces or tabs, but that it prevents a mix of both.
P.S. I think two spaces are a good alternative to a space, but I know there's a camp that would prefer four spaces or tab characters only. So ultimately, a user setting for this would be nice.
- When I put the cursor in front of line 2 and press