Text2Col ExtensionThe Text2Col Extension is a Visual Studio Code extension that processes selected text in the editor, formats it into a table, and replaces the selected text with the formatted table. This extension is particularly useful for converting structured text into a tabular format for better readability and organization. Features
Usage
Example
Test steps Test steps description Expected results of test step Step 1 Result of step 1 Step 2 Result of step 2 Output|---------------|----------------------------------------|----------------------------------------| |Test steps |Test steps description |Expected results of test step | |---------------|----------------------------------------|----------------------------------------| |step1 |Step 1 |Result of step 1 | |step2 |Step 2 |Result of step 2 | |---------------|----------------------------------------|----------------------------------------| Installation
ActivationThe extension is activated the very first time the command is executed. CommandsText2Col: Format Text to Table - Processes the selected text, formats it into a table, and replaces the selected text with the formatted table. Development To set up the extension for development: Clone the repository.
Code Overview
Extracts headers, steps, and results from the input text using regular expressions. Returns a structured array of data.
Formats the extracted data into a table with specified column widths. Returns the formatted table as a string.
Wraps text to fit within the specified column width. Returns an array of wrapped text lines.
Registers the command and sets up the event listeners for the extension. Replaces the selected text with the formatted table.
Cleans up the extension when it is deactivated. ContributingContributions are welcome! Please submit a pull request or open an issue to discuss any changes. LicenseThis project is licensed under the MIT License. By following this guide, you should be able to use and understand the functionality provided by the Text2Col extension in Visual Studio Code. DevelopperSherif Omran |