Here’s a snippet of code that’s just been formatted with the in-built formatter (Format Document):
Notice that the blank lines have no tabs - this leads to a whole host of unintuitive and unpleasant behaviour (specifically when using relative indentation).
Firstly, if I move my caret onto that line, it appears too far to the left, and attempting to write code would cause it to have incorrect indentation:
Secondly, this messes with the default behaviour for pasting code - if I paste code after a blank line with no tabs, it will appear too far to the left if using relative indentation:
In the context of Studio’s other formatting behaviours, removing tabs from empty lines when formatting documents makes no sense, and so far has been a large nuisance in my work. Hopefully this can be resolved quickly
Other text editors (such as VSC) behave like this too I believe. I actually prefer blank lines staying blank, without whitespace. It makes much more sense to remove trailing whitespace off blank lines as you would any other line anyways.
It would be a lot less noticeable and welcome if, like VSC, when you move your cursor to a blank line or paste text on one it’s automatically tabbed the right amount.