ASM Semicolon and Label Alignment Extension for VSCode
This VSCode extension aligns semicolons and labels in .asm files to specified columns.
Features
Semicolon Alignment
- Aligns semicolons in
.asm files to a configurable column (default is 60).
- Only modifies lines where the semicolon is not in the first column.
- Preserves all characters except for spaces and tabs when aligning semicolons.
- If there is no block selection, work with all file.
Semicolon Alignemt in Selected Area
Label Alignment
- Aligns labels with
= or .ds to the column where the cursor is positioned.
- Works from the current line to the first blank line or a line starting with a semicolon.
- Only modifies lines where the label is at the start.
- Keeps the cursor in the same position after alignment.
Configuration
You can configure the alignment column and the keybindings used to trigger the alignment commands in the settings.
Settings
asmSemicolonAlignment.column : The column to which semicolons should be aligned. Default is 60.
asmSemicolonAlignment.keybinding : The keybinding to trigger the semicolon alignment command. Default is ctrl+shift+; .
asmLabelAlignment.keybinding : The keybinding to trigger the label alignment command. Default is ctrl+shift+= .
Keybindings
ctrl+shift+; to align semicolons (configurable).
ctrl+shift+= to align labels (configurable).
Usage
- Open a
.asm file in VSCode.
- Use the command palette (
Ctrl+Shift+P ) and type Align Semicolons in ASM to trigger the semicolon alignment.
- Use the command palette (
Ctrl+Shift+P ) and type Align Labels in ASM to trigger the label alignment.
- Alternatively, use the default keybindings to trigger the commands:
ctrl+shift+; for semicolon alignment.
ctrl+shift+= for label alignment.
License
This extension is licensed under the MIT License.
| |