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 Panelfrom Command Palette. - Use the buttons to generate output.
Commands
Text Formatter: Open PanelText Formatter: Comma OutputText Formatter: Comma + Quote OutputText Formatter: SQL IN Clause OutputText Formatter: JSON Array OutputText 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:
123124125becomes123,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:
vsce package
This generates a text-formatter-<version>.vsix file in the project root.
Upload it at: https://marketplace.visualstudio.com/manage/publishers/VineelPusarla
Requires
vsceto be installed:npm install -g @vscode/vsce