The 'Align to columns' function removes leading whitespace from all the lines it operates on. This makes it less useful to me, since usually when I want to use this feature, it is in source code where I want to preserve existing indentation. I think this feature would be more useful if it preserved leading whitespace on lines, or at least had the option to do so.
For example, say I have this python function:
def some_function():
var1 = 'foo'
another_variable = 'bar'
variable3 = 'bla'
If I select the 3 variable assignment lines and invoke 'Align to columns', what I'd like to see is:
def some_function():
var1 = 'foo'
another_variable = 'bar'
variable3 = 'bla'
But instead what I get is:
def some_function():
var1 = 'foo'
another_variable = 'bar'
variable3 = 'bla'
I'm using PyCharm 2017.1.5. Thanks.
The 'Align to columns' function removes leading whitespace from all the lines it operates on. This makes it less useful to me, since usually when I want to use this feature, it is in source code where I want to preserve existing indentation. I think this feature would be more useful if it preserved leading whitespace on lines, or at least had the option to do so.
For example, say I have this python function:
If I select the 3 variable assignment lines and invoke 'Align to columns', what I'd like to see is:
But instead what I get is:
I'm using PyCharm 2017.1.5. Thanks.