Is there any shortcut to convert multi-line code to single line in VS Code 2018 (version 1.23) in Ubuntu.
For example convert this :
<label class="container-of-label">
<input type="checkbox" class="dataTable-checkBox">
<span class="checkmark"></span>
</label>
to :
<label class='container-of-label'><input type='checkbox' class='dataTable-checkBox'><span class='checkmark'></span></label>
Duplicate line. You can make the duplications of the same line using: Mac — Command + Shift + D. Windows/Ubuntu — Ctrl + Shift + D.
Mark code that you want to convert to single line, press F1, type join lines press Enter and voila!
You may also want to assign a keyboard shortcut for this operation. Search for Join lines
in keyboard shortcuts list and assign the desired shortcut.
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