Skip to content

Include padding for linewise comments on empty lines #494

@brdoney

Description

@brdoney

I noticed that toggling a linewise comment (e.g. require("Comment.api").toggle.linewise.current()) on an empty line does not add padding. Interestingly, when a line is just whitespace, it does add padding.

So is leaving padding out of empty lines intentional? Personally, I think padding should be added universally.

I have been writing a function to toggle comments while in insert mode and the lack of whitespace unfortunately causes an issue while on empty lines. Specifically, if I want to start a comment on an empty line, I have to toggle the comment then manually add padding before I start writing my comment, since the plugin doesn't add it (which is obviously not desirable).

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