Skip to content

Option to pretty format small vectors into a single line. #298

@kapple19

Description

@kapple19

Having a vector pretty format as

"bearings": [
    -165,
    -150,
    -135,
    -120,
    -105,
    -90,
    -75,
    -60,
    -45,
    -30,
    -15,
    0,
    15,
    30,
    45,
    60,
    75,
    90,
    105,
    120,
    135,
    150,
    165,
    180
],

would be much nicer if it was

"bearings": [-165, -150, -135, -120, -105, -90, -75, -60, -45, -30, -15, 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180],

especially since I have so many of them.

I can somewhat understand if this would be tricky.
Particularly if it had a condition that it was a numeric vector (as opposed to a vector of vectors) with a configurable size limit.

Is there functionality already available that allows me to alter the formatting? I don't see an option for AlignmentContext on this.

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