numt
ali50m's VS Code toolbox.
Features
Multi-cursor numbering
Use numt.numtxt to fill multiple selections with sequential numbers.
- Default shortcut:
Ctrl+K Ctrl+N
- macOS shortcut:
Cmd+K Cmd+N
- Works when the editor has multiple selections
- Supports optional top-to-bottom sorting
- Supports optional leading zero padding
Use numt.format to format JSONC files and normalize configured properties.
- Default shortcut:
Ctrl+K Ctrl+U
- Parses JSONC with comments
- Formats the whole document using the configured indentation
- Converts configured properties to upper or lower case
- Saves the document after formatting
- Warns when duplicate configured property values are found
The formatter safely ignores missing properties, non-string values, and configured nodes that are not arrays.
ST (Structured Text) formatting
Use numt.stfmt to format IEC 61131-3 Structured Text files, targeting TwinCAT 2.
- Default shortcut:
Ctrl+K Ctrl+T
- Supports
IF / CASE / FOR / WHILE / REPEAT control structures with automatic indentation
- Normalizes operator spacing (
:=, =, <>, +, -, *, /, etc.)
- Preserves comments (
// and (* ... *)) and string literals unchanged
- Formats
PROGRAM / FUNCTION / FUNCTION_BLOCK / METHOD / VAR declaration blocks with colon alignment
- Formats
TYPE / STRUCT blocks
- Supports AT address modifiers (
AT%I*, AT%Q*, AT%M*)
- Normalizes type keywords to uppercase (
INT, BOOL, REAL, etc.)
- Supports format-on-save for
.st files
Configure numt.buttons to add custom command buttons to the VS Code status bar.
"numt.buttons": [
{
"name": "Save Without Formatting",
"icon": "$(save)",
"command": "workbench.action.files.saveWithoutFormatting",
"color": "#FFFFFF"
}
]
Settings
{
"numt.numtxt.alwayssort": "no",
"numt.numtxt.prefix": "yes",
"numt.format.indentation": 2,
"numt.format.cap": "upper",
"numt.format.sections": [
{
"node": "Items",
"property": "LinkTo"
},
{
"node": "Alarms",
"property": "LinkTo"
},
{
"node": "Recipes",
"property": "LinkTo"
}
]
}
Thank Syncfusion Metro Studio for icon.