How to expand a line of code? For example join lines command will do this
before
{
a: 123,
b: 321
}
after
{ a: 123, b: 321 }
And I need to do the opposite,
from this
{ a: 123, b: 321 }
to this
{
a: 123,
b: 321
}
Is there a way to do it? Maybe a plugin? Thanks.
Visual Studio Code has a powerful command-line interface built-in that lets you control how you launch the editor. You can open files, install extensions, change the display language, and output diagnostics through command-line options (switches).
If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you've selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down.
Using the example you provided you could use the splitline plugin https://marketplace.visualstudio.com/items?itemName=chenzhe.split-line
I noticed the example you provided wasn't valid JSON (missing quotes). If it was, or was any other valid type of code you could use the built VS code code formatter:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With