Home > database >  Collapse all lines to one line in VS2019?
Collapse all lines to one line in VS2019?

Time:08-20

I there any way to do the following in VS2019?

Say I have code that looks like this:

    Somefunction();
    SomeStatement;
    SomeOtherFunction();

I want to select these lines, and quickly and easily press a button or key and have it produce this (based on semicolon):

    Somefunction();SomeStatement;SomeOtherFunction();

...And also reverse it. It's sort of like collapsing the code except it'll be remembered between instances and also compatible with other systems.

Is there any way to make this happen without writing a whole extension?

CodePudding user response:

Use Eidt->Advanced->Join Lines:

Shift Alt L,Shift Alt J

enter image description here

  • Related