A VS Code extension that instantly reformats selected Markdown tables with consistent column padding and alignment.
Features
- Select & format — highlight any Markdown table, press the hotkey, and get a cleanly padded table
- Header centering — header row cells are center-aligned
- Content alignment — data rows are left-aligned with trailing padding
- Separator rebuild — the
|---| separator row is regenerated to match column widths
- Active only in Markdown — the command and hotkey only fire in
.md files
Before:
| Name | Age | City |
|---|---|---|
| Alice | 30 | New York |
| Bob | 25 | Los Angeles |
After:
| Name | Age | City |
|------------|-----|-------------|
| Alice | 30 | New York |
| Bob | 25 | Los Angeles |
Usage
- Open any Markdown file
- Select the table text (including the header and separator rows)
- Press the hotkey:
- Mac:
Cmd+Alt+T
- Windows / Linux:
Ctrl+Alt+T
Or run it from the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
Format Selected Markdown Table
Requirements
- VS Code
^1.80.0
- No additional dependencies
Known Issues
- Tables with merged cells or HTML inside cells are not supported
- Alignment hints in the separator row (
:---, :---:, ---:) are not yet preserved
Release Notes
0.0.1
Initial release — select-and-format with hotkey support.
| |