![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/github-banner.png)
- Provides enhanced editing capabilities which operate on either current document or can pipe output to a new document.
- Most commands implement auto scoping to select current block, document or selection as the target of an operation.
- A block refers to code that has an empty line above and below.
Features
Unique Lines
- Removes duplicate lines from the document
- Operates on selection or current block if no selection
Unique Lines As New Document
- Unique lines are opened in a new document
- Operates on selection or current block if no selection
Filter Lines
- Keep matching lines of filter
- Operates on selection or entire document if no selection
- Filter using regex or literal
Filter Lines As New Document
- A new document is created with lines matching filter
- Gutter decorators show original line number from original document
- Operates on selection or entire document if no selection
- Filter using regex or literal
- Add lines relative to filtered lines by count and regular expression match
Parent Levels add context by indentation level. Similar to vscode folding levels.
- Examples:
0 will include all siblings of the matched lines. Where a sibling is determined by being at the same indentation level next to the matched line.
1 will include all siblings + the parent siblings ( one less indentation level )
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Filter-lines-as-new-document.png)
Sort Lines
- Sorts by column when there is a vertical stack of multiple cursors using the cursor position to determine sort text for the line.
- Operates on selection or entire document if no selection
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/sort-lines-by-column.png)
Sort Lines By Length
- Sorts by length of the line
- Operates on selection or current block if no selection
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/sort-lines-by-length.png)
Align To Cursor
- Aligns text right of cursor to cursor position
- Single cursor will auto expand vertically to block
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Align-to-cursor.png)
Align CSV
- Aligns CSV text into columns. Can also specify custom delimiter.
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Align-CSV.png)
Compact CSV
- Does the opposite of
Align CSV , removes white space between columns.
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Compact-CSV.png)
Copy To New Document
- Copies selections to a new document
- Operates on selections or find match results or entire document
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Copy-to-new-document.png)
Select Lines
- Expands all current find match results or cursors to full line selections
Lines As JSON String Array
- Converts each line to a JSON string
- Useful for easily creating snippet bodies with selected text
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Lines-as-JSON-string-array.png)
Selection As JSON String
- Transform all contents of selection as a single JSON String
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Selection-as-JSON-String.png)
Trim Lines
- Remove whitespace at beginning and end of lines
Randomize Lines
- Randomize the order of selected lines
Reverse Lines
- Reverse the order of selected lines
Count Duplicate Lines As New Document
- Count the number of instances of each unique line
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Count-duplicate-lines-as-new-document.png)
Encode / Decode
- Encode Base64
- Decode Base64
- Encode URL Segment
- Decode URL Segment
- Encode x-www-form-urlencoded
- Decode x-www-form-urlencoded
- Hash MD5
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Encode-Decode.png)
JSON String As Text
- unescapes a JSON string to text
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/JSON-String-as-text.png)
Split Lines
- split lines using specified delimeter
Split Lines After
- splits lines after the delimeter while keeping the delimeter
Split Lines Before
- splits lines before the delimeter while keeping the delimeter
Join Lines
- join lines using specified delimeter
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Join-lines.png)
Select Highlights
- make selections of all text highlighted in the editor
Randomize Selections
- replace selections with random order of selected text
Reverse Selections
- replace selections with reverse order of selected text
Sort Selections
- replace selections with sorted order of selected text
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/sort-selections.png)
Trim Selections
- replace selections with trimmed selected text
Rotate Forward Selections
- rotates the order of the selections forward
Rotate Backward Selections
- rotates the order of the selections backward
Normalize Diacritical Marks
- transforms accented characters to non-accented versions
![ScreenShot](https://github.com/dakaraphi/vscode-extension-transformer/raw/HEAD/readme-images/Normalize-Diacritical-Marks.png)
| |