I have 4 lines like this in vscode:
1 line;
2 line;
3 line;
4 line;
Does vscode have a shortcut that can quickly compact 4 lines to 1 line like this:
1 line; 2 line; 3 line; 4 line;
Select your code => F1 => "Join Lines"
You can also create a keyboard shortcut for this command editor.action.joinLines
Default shortcut on Mac is Ctrl+J
It seems vscode's "Join Lines" keyboard shortcut in macOS is ctrl + j
:
I also had same issue and solved it. If you use Prettier, try it as below.
Settings -> Prettier.printWidth"
The default value is 80. If you change this value higher than 80.
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