Text Power Tools is an all-in-one text manipulation extension for VS Code inspired by TextFX for Notepad++ and Filter Lines for Sublime Text. All commands supports multiple selections where it is applicable, and many of them can target new documents, so the original source remains unchanged.
Filter lines using strings or regular expressions (grep like experience), even into new editors (without modifying the original source): Filter line commands take an input (a raw text or a regular expression) and filter the selected lines based on whether the user wants to include or exclude lines containing that string or matching that regex. It works just like like
grep but inside VS Code.
All filtering commands can target new editors, so the original content won't be changed. Search commands with
into a new editor end to use this feature.
These commands search/match in a case insensitive manner. To use case sensitive search/match, set the value of the
textPowerTools.caseSensitiveFiltering setting to
The last 10 filter strings and regular expressions are presented and can be used quickly when executing these commands.
Extract information from the source lines using regular expressions: First input is the regular expression which should be matched with capture groups to find the desired parts of the lines (e.g.:
(\d.\d) dogs). The second input is the replacement rule, which should contain capture group references (e.g.
$1 cats). With these commands you can transform matching lines to the desired format in seconds.
The last 10 filter strings and replacement expressions are presented and can be used quickly when executing these commands.
Remove duplicated, empty, surplus empty lines and control characters
Count occurrences of lines: This command will counts how many times a line appears in the selected text and generates an output with the number of occurrences and the lines themselves
Insert decimal and hex number sequences: Inserts sequence o decimal or hex numbers to every selection. When inserting hex numbers, by default they will be uppercase. To insert lowercase hex numbers, set the value of the
textPowerTools.insertUppercaseHexNumbers setting to
Insert line numbers: Inserts line numbers to the start of each line in every selection. Line numbers can be real line numbers in the file or can start with 1.
Insert full file path, directory path and file name of the opened file.
Generate GUIDs: Inserts GUIDs (globally unique identifiers or universally unique identifier) to the text in the selected format. Mutiple GUIDs can be inserted at once. To insert GUIDs with uppercase hex characters, set the value of the
textPowerTools.insertUppercaseGuids setting to
true. The default GUID style can be set using the
Change case of text (camelCase, PascalCase, snake_case, CONSTANT_CASE, dash-case, dot.case) and swap casing.
Note: Title Case, UPPER CASE and lower case is not implemented in this extension as it is available in VS Code by default via the Transform to Title Case, Transform to Uppercase* and Transform to Lower Case commands respecively.
Pad start and end of strings: Pad the start or the end of selections to the desired length with default or custom character sequences. The default pad string can be customized with the
Copy content of selections to a new editor
Convert numbers from decimal to hexadecimal and vice versa
Format content as table by splitting text to pieces by predefined or custom characters or strings and formatting them as a table with equal length columns using space characters.
Text can be splitted by tabulators, semicolons, commas, pipes or any custom character sequences.
Encode and decode various encoding formats: URL encode, HTML entities, XML entities and Base64
Generate Lorem impsum texts
Convert to Zalgo text
This extension requires at least Visual Studio Code 1.26.