Skip to content

$DefaultBreakLinesMethod = None #4

@hifismith

Description

@hifismith

I would like CodeFormatter to help me with spacing and indentation but not line breaks. I'd like it to

  1. Preserve all line breaks I enter
  2. Prevent the formatter from adding line breaks

So if I write:

a[x_]:=Block[{b},
b=2;x^2+b
]

I would like it to return

a[x_] := Block[{b},
  b = 2; x^2 + b
]

i.e. add spacing and indentation, but do not add or remove line breaks

Is there a way to do this? I tried $DefaultBreakLinesMethod=None, but it appears that symbol has to be set to a string. And I would like to apply these settings in VS Code so I can use "Format Document" or "Format Selection".

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