Editor Text ToolkitEditing tools merged into one VS Code extension, with zero runtime dependencies. UI available in English and 简体中文 (follows the VS Code display language).
CommandsFive commands in the Command Palette, all under the
One further command is menu-only and hidden from the palette, because it needs a file to act on:
Two-level picker
Rules that hold everywhere: the second level always starts with KeybindingsThis extension contributes no default keybindings — nothing is bound out of the box, so it cannot collide with your existing bindings or with other extensions. Bind what you use, optionally with arguments:
SettingsSettings come in two layers, so the Settings UI stays short. Exposed layer — the seven settings you actually tune
Notes:
Line reference syntaxMultiple cursors or multiple selections produce multiple fragments in one reference. Line numbers are collected from every selection, deduplicated, sorted, and consecutive ones are merged into a fragment:
The
The same selection then copies as Built-in layer —
|
| Key | Type | Built-in default |
|---|---|---|
copyPath.useLineCountSyntax |
boolean | false (use a-b; true uses a+n) |
changeCase.includeDotInCurrentWord |
boolean | false |
alignByRegex.rememberLastInput |
boolean | true |
plainText.applyEditorSettings |
boolean | true |
plainText.disableLineNumbers |
boolean | false |
plainText.editorOverrides |
object | {}, merged on top of the 29-entry [plaintext] table below |
You do not need this README to discover any of it: the Settings UI shows every key with its type, built-in default and accepted values, and in settings.json IntelliSense completes each key. Two snippets are offered on the value — All built-in defaults writes out the whole textToolkit.advanced object, and All 29 built-in [plaintext] overrides writes out the full override table, both ready to edit.
plainText.editorOverrides merges into the built-in table rather than replacing it:
- setting id → value: change that entry (
"editor.minimap.enabled": truekeeps the minimap on), - setting id →
null: drop that entry, so the setting keeps whatever you have configured globally, - any other
editor.*id: added to the table, even if it is not listed below.
Unknown keys and values of the wrong type are ignored and the built-in default is kept, so a typo can never leave the extension in a broken state.
The 29 built-in [plaintext] overrides
All of them are written under the [plaintext] language scope, so they never affect your code files. "Other accepted values" lists what VS Code itself allows for that setting.
| Setting id | Built-in value | Other accepted values |
|---|---|---|
editor.minimap.enabled |
false |
true |
editor.wordWrap |
"off" |
"on", "wordWrapColumn", "bounded" |
editor.folding |
false |
true |
editor.stickyScroll.enabled |
false |
true |
editor.bracketPairColorization.enabled |
false |
true |
editor.guides.indentation |
false |
true |
editor.guides.bracketPairs |
false |
true, "active" |
editor.matchBrackets |
"never" |
"always", "near" |
editor.occurrencesHighlight |
"off" |
"singleFile", "multiFile" |
editor.selectionHighlight |
false |
true |
editor.renderWhitespace |
"none" |
"boundary", "selection", "trailing", "all" |
editor.renderControlCharacters |
false |
true |
editor.codeLens |
false |
true |
editor.colorDecorators |
false |
true |
editor.links |
false |
true |
editor.hover.enabled |
false |
true |
editor.parameterHints.enabled |
false |
true |
editor.suggestOnTriggerCharacters |
false |
true |
editor.wordBasedSuggestions |
"off" |
"currentDocument", "matchingDocuments", "allDocuments" |
editor.quickSuggestions |
{ "other": false, "comments": false, "strings": false } |
each context also takes "on" / "inline" / "off" |
editor.formatOnType |
false |
true |
editor.formatOnPaste |
false |
true |
editor.autoClosingBrackets |
"never" |
"always", "languageDefined", "beforeWhitespace" |
editor.autoClosingQuotes |
"never" |
same as autoClosingBrackets |
editor.trimAutoWhitespace |
false |
true |
editor.semanticHighlighting.enabled |
false |
true, "configuredByTheme" |
editor.unicodeHighlight.nonBasicASCII |
false |
true, "inUntrustedWorkspace" |
editor.unicodeHighlight.invisibleCharacters |
false |
true |
editor.unicodeHighlight.ambiguousCharacters |
false |
true |
Setting plainText.applyEditorSettings to false skips this table entirely and only switches the document language.
Align by RegEx
Select the lines to align, run the command, then enter either a regular expression or the name of a template from textToolkit.alignByRegex.templates. The two-level picker lists your templates directly, so you don't have to remember their names.
This extension fixes the upstream alignment behaviour when the selected lines contain a different number of matches. Column widths are now computed only among the lines that still have a match in that column, so a short line's trailing text can no longer widen another line's middle column:
# input # before (upstream) # now
x = 111111111; x = 111111111; x = 111111111;
yy = 2; zzz = 3; yy = 2; zzz = 3; yy = 2; zzz = 3;
w = 4; vvvvv = 5; w = 4; vvvvv = 5; w = 4; vvvvv = 5;
When only one line has a match in a given column, that column is left untouched instead of being padded to an unrelated width. Input where every line has the same number of matches is aligned exactly as before.
Plain Text Mode (large files)
Four ways in:
- Explorer right-click →
Open in Plain Text Mode— opens the file and enters the mode in one step, without ever rendering it normally first. Works on a multi-selection; folders in the selection are skipped. Text Toolkit: Toggle Plain Text Modefrom the Command Palette, for the file already in front of you.- Automatically, when you open a file of at least
textToolkit.plainText.promptSizeMBMB and accept the prompt (Don't ask againis remembered; undo it from the Plain Text Mode entry in the picker). - Silently, for extensions listed in
textToolkit.plainText.autoApplyExtensions.
What it does:
- Sets the document language to
plaintext, which stops tokenization, semantic highlighting and every language-specific provider for that document. - With
plainText.applyEditorSettingson, writes[plaintext]-scoped overrides foreditor.minimap.enabled,wordWrap(off, so lines wrap only at real newlines),folding,stickyScroll,bracketPairColorization,guides,matchBrackets,occurrencesHighlight,selectionHighlight,renderWhitespace,renderControlCharacters,codeLens,colorDecorators,links,hover,parameterHints, suggestions,formatOnType/formatOnPaste, auto-closing pairs,trimAutoWhitespace,semanticHighlightingand the threeunicodeHighlightscanners. - Shows a
Plain Textstatus bar item; click it (or toggle again) to restore the original language and every setting value that was replaced. Because the overrides are language-scoped, your code files are unaffected while the mode is on.
Scope and limits — read before relying on it:
- This removes rendering and language-service cost. It does not change how VS Code loads files: the whole document still lives in a
TextModel, and in-file find/replace still runs on that model. Expect a solid improvement in the 5–50 MB range, and no order-of-magnitude change for hundreds of MB. - Settings are written to your Workspace settings when a workspace is open, otherwise to User settings. Original values (including "was not set") are recorded and restored on exit.
- Files VS Code refuses to open at all are unaffected by this mode; that limit is
files.maxMemoryForLargeFilesMB, which this extension deliberately does not touch (raising it trades stalls for out-of-memory crashes).
Migrating from the three original extensions
Uninstall the originals first: turweet.copy-path-line-numbers-flexible, wmaurer.change-case, janjoerke.align-by-regex.
Command IDs (update your keybindings.json and any scripts):
| Old command ID | New command ID |
|---|---|
copyPath.lineNumber.copy |
textToolkit.copyPathWithLines |
extension.changeCase.commands |
textToolkit.changeCase (no arguments) |
extension.changeCase.<style> |
textToolkit.changeCase with { "style": "<style>" } |
align.by.regex |
textToolkit.alignByRegex |
Settings:
| Old setting | New setting | Note |
|---|---|---|
copyPath.lineNumber.pathStyle |
textToolkit.copyPath.pathStyle |
values changed: absolute (full path) → absolute, relative → relative, tilde (~) → tilde, fileName (name only) → fileName |
copyPath.lineNumber.separatorBetweenPathAndLine |
textToolkit.copyPath.separator |
— |
copyPath.lineNumber.selectionMultiLineFormat |
textToolkit.copyPath.multiLineFormat |
— |
changeCase.includeDotInCurrentWord |
textToolkit.advanced → changeCase.includeDotInCurrentWord |
moved into the built-in layer; the upstream setting was never registered at all (declared outside contributes) |
align.by.regex.templates |
textToolkit.alignByRegex.templates |
— |
Old settings are not migrated automatically; re-set them once.
Behaviour changes vs the original extensions
sentencenow capitalises the first letter (testString→Test string); the oldsentence-case@2produced all lower case.titlemaps tocapitalCase, so every word is capitalised — the oldtitle-case@2kept small words such asa,of,thelower case.- Letter/digit boundaries are no longer split:
fooBarBaz42Quux→foo bar baz42 quux. Align by RegExcolumn widths changed for selections whose lines have different match counts (see above). Uniform selections are unchanged.- Multi-line Change Case splits on the document's own end-of-line sequence instead of
os.EOL, which upstream got wrong whenever the platform EOL differed from the document EOL.
Localization
- Command titles, setting descriptions:
package.nls.json(English) andpackage.nls.zh-cn.json. - Runtime strings (messages, picker labels):
l10n/bundle.l10n.zh-cn.json, English lives in the source as the lookup key.
To add a language, copy either file to the matching locale suffix (for example package.nls.ja.json and l10n/bundle.l10n.ja.json).
Development
npm install
npm run typecheck # tsc --noEmit
npm test # esbuild + mocha over the pure logic
npm run compile # bundle to out/extension.js
npm run icon # re-rasterize media/icon.png from the shapes in scripts/render-icon.mjs
npm run package # typecheck + test + vsce package
change-case@5 is pure ESM, so the extension is bundled to CJS with esbuild; the packaged .vsix contains no node_modules.
Credits & License
MIT. This extension merges and adapts:
- wmaurer/vscode-change-case (MIT)
- janjoerke/vscode-align-by-regex (MIT)
- Copy Path Line Numbers Flexible (MIT)
See THIRD_PARTY_NOTICES.md.