Skip to content

Unindent for snippets #1945

Closed
Closed
@Vampire

Description

@Vampire

Description

It would be nice if snippets would be unindented, so that the leading whitespace that is common to all lines in the snippet is removed, so it starts left-most with the first character.
This should imho even be the default behavior if it will be configurable.

Benefits

No need to cram the snippet code to beginning of line in the source file to have it nice in the docs.

Solution Idea

Just get the leading whitespace of all lines, take the shortest one and remove that from all lines.
If someone has mixed space and tab indents, it is his own fault. :-D

Metadata

Metadata

Assignees

No one assigned

    Labels

    P: maybePending approval of low priority request.T: featureFeature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions