textmatrix ExtensionThis simple extension treats the text of the active text editor document as a matrix (where elements are separated by whitespace) and offers some simple matrix operations. https://marketplace.visualstudio.com/items?itemName=ractive.textmatrix To apply an operation, open the command palette in vscode ( Be aware that the text in the currently active editor window (representing a matrix), is replaced with the result of the matrix operation. The text must represent a rectangular matrix with the exact same amout of elements on each line, separated by whitespace. A simple, valid matrix e.g. is:
or
The resulting matrix of the operation is always printed out with one space between every element. The available commands in vscode are: Transpose textTransposes the rows and columns of the text:
becomes:
Flip the characters on every line of the textFlips the elements on each row (x axis):
becomes:
Flip the lines of the textFlips the lines of the text:
becomes:
Rotate text by 90 degreesRotates the matrix by 90 degrees:
becomes:
Rotate text by 180 degreesRotates the matrix by 180 degrees:
becomes:
Rotate text by 270 degreesRotates the matrix by 270 degrees:
becomes:
UsageThis extension can be used to manipulate images in https://arcade.makecode.com. Copy/paste an image as text (from the javascript source) to a vscode window and flip it or rotate it easily with on of the matrix operations. |