Spread Gather
A VS Code extension that provides vim-like splitjoin functionality for bracket contents.
Features
Spread: Expand single-line bracket content to multiple lines
{a, b, c} → {
a,
b,
c
}
Gather: Collapse multi-line content to single line (recursive)
{
a,
{
b,
c
}
} → {a, {b, c}}
Supported Brackets
- Curly braces:
{}
- Square brackets:
[]
- Parentheses:
()
Smart Cursor Detection
The extension uses VS Code's bracket matching behavior:
- If the RIGHT side of cursor is a bracket, target that group
- Else if the LEFT side of cursor is a bracket, target that group
- Else target the enclosing group
This means:
|{a, b, c} → targets {a, b, c}
{a, b, c|} → targets {a, b, c}
{a, b, c}| → targets {a, b, c}
Commands
- Spread: Expand to multiple lines (
spreadGather.spread)
- Gather: Collapse to single line (
spreadGather.gather)
Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
Indentation
The extension respects your VS Code editor settings for indentation (tabs vs spaces, tab size).
License
MIT
| |