Workbook
Helps developers write the correct, canonical name for a value when they
don't know the exact spelling. You keep a local JSON file of names, each with a
canonical default value and any number of alternative spellings / translations
(e.g. entryno, entryNo, Buchungsnr. all map to Entry No.).
Workflow
- Select the code you want to fix in the editor.
- Run Workbook: Replace Selection With Name (right-click menu, command
palette, or Ctrl+Alt+N / Cmd+Alt+N).
- The selection is fuzzy-searched against every name and every translation
(not a direct/exact search — the whole point is tolerating unknown spelling).
- Pick a hit from the list. The name's default value overwrites your selection.
Names file
The file defaults to .vscode/workbook-names.json (configurable via
workbook.namesFile). Format:
{
"names": [
{
"default": "Entry No.",
"translations": ["entryno", "entryNo", "Entry Number", "Buchungsnr."]
}
]
}
Run Workbook: Open Names File to open it (it offers to create one, seeded
from the bundled defaults, if missing). The extension ships with a ready-made
names file of 100 common entries, so it works out of the box even without a
workspace file. Provide your own by creating .vscode/workbook-names.json or
pointing workbook.namesFile at any JSON file.
Settings
| Setting |
Type |
Default |
Description |
workbook.namesFile |
string |
"" |
Path to the names file. Relative paths resolve against the workspace folder; empty uses .vscode/workbook-names.json, falling back to the bundled default names file. |
workbook.matchThreshold |
number |
0.4 |
Minimum fuzzy-match score (0-1). Lower returns more (looser) matches. |
Development
npm install
npm run compile
Press F5 to launch an Extension Development Host with the
test-fixtures folder open for testing.