Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Single-line, Multi-lineNew to Visual Studio Code? Get it now.
Single-line, Multi-line

Single-line, Multi-line

SuperKXT

|
4,272 installs
| (2) | Free
Toggle Objects, Arrays, & Assignments Between Single & Multi-line
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Single-line, Multi-line


Toggles Selected Text Between Single & Multi-lines. Meant to convert Arrays, Objects, & Assignments Between Single & Multi-line.

If selected text has no line breaks: Adds Lines Break:

  1. Before Or After Comma ,
  2. After Semicolon ;
  3. After Opening Brackets [ { (
  4. Before & After Closing Brackets ] } )

If selected text has at least one line break: Removes All Line Breaks.

Note: The code is formatted by calling the format command, which will use your preferred code formatter.


Screenshot


How To Use

  • Open Command Palette with ctrl + shift + p & Type Single-line, Mult-line
  • To Convert With Commas On Old Line:
    • Use Hot Key: ctrl + alt + s in Windows or ctrl + cmd + s in Mac
  • To Convert With Commas On New Line:
    • Use Hot Key: ctrl + alt + x in Windows or ctrl + cmd + x in Mac

Changing Key Bindings

  • Open up Your Key Bindings by:
    • Pressing ctr + k, ctrl + s
    • Pressing ctrl + shift + p and type Keyboard Preferences
  • Type Singe-line, Multi-line in the search box.
  • Assign different keys by:
    • Clicking the pencil icon that shows on hover
    • Right clicking the shortcut and selecting Change Keybinding
    • Pressing Enter with a command selected
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft