Skip to content

'Align to columns' removes leading whitespace #39

@ajenkins-cargometrics

Description

@ajenkins-cargometrics

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions