KiraHoneybee
KiraHoneybee

Reputation: 682

Collapse all lines to one line in VS2019?

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?

Upvotes: 0

Views: 180

Answers (1)

Minxin Yu - MSFT
Minxin Yu - MSFT

Reputation: 4304

Use Eidt->Advanced->Join Lines:

Shift+Alt+L,Shift+Alt+J

enter image description here

Upvotes: 1

Related Questions