Skip to content

Avinm/vscode-extension-transformer

 
 

Repository files navigation

Transformer

  • 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

ScreenShot

Unique Lines As New Document

  • Unique lines are opened in a new document
  • Operates on selection or current block if no selection

ScreenShot

Filter Lines

  • Keep matching lines of filter
  • Operates on selection or entire document if no selection
  • Filter using regex or literal

ScreenShot

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

ScreenShot

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

Sort Lines By Length

  • Sorts by length of the line
  • Operates on selection or current block if no selection

ScreenShot

Align To Cursor

  • Aligns text right of cursor to cursor position
  • Single cursor will auto expand vertically to block

ScreenShot

Align CSV

  • Aligns CSV text into columns. Can also specify custom delimiter.

ScreenShot

Compact CSV

  • Does the opposite of Align CSV, removes white space between columns.

Copy To New Document

  • Copies selections to a new document
  • Operates on selections or find match results or entire document

Select Lines

  • Expands all current find match results or cursors to full line selections

Lines As JSON

  • Converts each line to a JSON string
  • Useful for easily creating snippet bodies with selected text

ScreenShot

Selection As JSON String

  • Transform all contents of selection as a single JSON String

Trim Lines

  • Remove whitespace at beginning and end of lines

Randomize Lines

  • Randomize the order of selected lines

Count Duplicate Lines As New Document

  • Count the number of instances of each unique line

Macros

About

Filtering, Selection and Text Transformations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%