Formats values from the active editor or selected text without changing the original file.
Features
Input example:
123
124
125
Or:
123124125
Outputs:
123, 124, 125
'123', '124', '125'
Also included:
IN ('123', '124', '125')
[
"123",
"124",
"125"
]
How to run locally
Open this folder in VS Code.
Press F5.
In the Extension Development Host window, open any text file.
Run Text Formatter: Open Panel from Command Palette.
Use the buttons to generate output.
Commands
Text Formatter: Open Panel
Text Formatter: Comma Output
Text Formatter: Comma + Quote Output
Text Formatter: SQL IN Clause Output
Text Formatter: JSON Array Output
Text Formatter: Find Duplicates
Notes
If text is selected, only selected text is used.
If nothing is selected, the full active file content is used.
Source file is not modified.
Output opens in a separate editor window/panel.
If input is only digits and its length is divisible by 3, it splits every 3 digits. Example: 123124125 becomes 123, 124, 125.
Find Duplicates: finds duplicate lines (after trimming spaces), shows each duplicate with its count sorted highest first. If input exceeds 1MB in the panel, use the command palette version instead.
Packaging & Publishing
To create a .vsix package for publishing to the VS Code Marketplace: