Skip to content

Disabling removal of whitespace on the current empty line on save #60

Description

@gabrielecirulli

Hey, apologies if this issue has already come up in the past but I really can't find a solution using the available settings.

I often find myself opening a new block (say a function) and going to a new line where there's only really the indentation. I will then switch the window to my browser and, since I have automatic saving enabled, it'll save and trim whitespace, including the indentation on the current line which is needed for me to be able to write the code inside the function later.
I tried "trailing_spaces_include_empty_lines": false but at that point it'll ignore all empty lines, which is not what I want because I'd like empty lines with stray indentation to be removed correctly.

Is there a way to make it ignore the current line if it's empty but only because I have my cursor on it, and delete all other empty lines?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions