annsk / vscode-alignment

Align chars in selection.
MIT License
13 stars 5 forks source link

Alignment

Current Version Install Count Rating

Functionality

This extension align chars in selection. It helps creating clean, formatted code.

usage

Select text and press Alt+= (on macOS Option+=). You can also use context menu commend.

Shortcuts

Align all chars

Align to first char

Align whitespace

Extension Settings

This extension contributes the following settings:

Space settings:

Default settings

// Chars to align
"alignment.chars": {
    ":": {
        "spaceBefore": 0,
        "spaceAfter": 1
    },
    "::": {
        "spaceBefore": 0,
        "spaceAfter": 0
    },
    "=": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "===": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "==": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "=>": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "+=": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "-=": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "*=": {
        "spaceBefore": 1,
        "spaceAfter": 1
    },
    "/=": {
        "spaceBefore": 1,
        "spaceAfter": 1
    }
}

Changelog

0.3.0

0.2.3

0.2.0

0.1.0