Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Align RegexNew to Visual Studio Code? Get it now.
Align Regex

Align Regex

thangckt

|
1 install
| (0) | Free
Aligns selected lines of text by a regular expression.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Align Regex

This extension is originally based on vscode-align-by-regex

This extension aligns multiple lines of text by regular expressions. It can align anything, e.g., aligning trailing comments, key-value pairs, or any other text patterns defined by regular expressions.

Features

  • Align multiple lines of text by regular expressions.
  • Store regular expressions as templates for repeated use.
  • Run alignment from the editor context menu.
  • Support aligning multiple selections and cursors simultaneously.

Extension Settings

This extension contributes the following settings:

  • align.regex.templates: Templates for regular expressions used for alignment (i.e. "align.regex.templates": { "abc": "=|,|:"}).

    The default templates are:

    {
        "align.regex.templates": {
            "YAML_comments": "\\s+#",
            "JS_comments": "\\s+//"
        }
    }
    

Examples

Example 1

Release Notes

1.0.0

  • Support aligning multiple selections and cursors simultaneously.
  • Run alignment from the editor context menu.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft