VS Code formatter focused on readability in dense code blocks.
It optimizes horizontal spacing so related tokens line up across nearby lines.
Why use it
- Faster scanning: repeated structures become visually comparable at a glance.
- Better diffs: intent-focused changes are easier to spot when columns are aligned.
- Safer formatting: only spacing is changed, code logic stays untouched.
- Practical workflow: format full files or only selected line ranges.
Supported languages: Bash, C, C++, C#, CSS, Go, HTML, Java, JavaScript, JSON, Lua, PHP, Python, Ruby, Rust, TypeScript, TSX, XML, YAML.
Examples
JavaScript (token alignment)
Before:
export function neoWarn(...message) { (window.NeoLogWarnError?.neoWarn || console.warn)(...message); }
export function neoError(...message) { (window.NeoLogWarnError?.neoError || console.error)(...message); }
After:
export function neoWarn(...message) { (window.NeoLogWarnError?.neoWarn || console.warn)(...message); }
export function neoError(...message) { (window.NeoLogWarnError?.neoError || console.error)(...message); }
PHP (column alignment in control flow)
Before:
if (str_ends_with($json_string, "false")) { $parsed_json = false; $json_start_index = $length - strlen("false"); }
else if (str_ends_with($json_string, "true")) { $parsed_json = true; $json_start_index = $length - strlen("true"); }
else if (str_ends_with($json_string, "null")) { $parsed_json = null; $json_start_index = $length - strlen("null"); }
else if (\NeoGlobal\preg_match_better('/(-?\d+\.\d+)$/', $json_string, $matches)) { $parsed_json = json_decode($matches[1]); $json_start_index = $length - strlen($matches[1]); }
else if (\NeoGlobal\preg_match_better('/(-?\d+)$/', $json_string, $matches)) { $parsed_json = json_decode($matches[1]); $json_start_index = $length - strlen($matches[1]); }
After:
if (str_ends_with($json_string, "false")) { $parsed_json = false; $json_start_index = $length - strlen("false"); }
else if (str_ends_with($json_string, "true")) { $parsed_json = true; $json_start_index = $length - strlen("true"); }
else if (str_ends_with($json_string, "null")) { $parsed_json = null; $json_start_index = $length - strlen("null"); }
else if (\NeoGlobal\preg_match_better('/(-?\d+\.\d+)$/', $json_string, $matches)) { $parsed_json = json_decode($matches[1]); $json_start_index = $length - strlen($matches[1]); }
else if (\NeoGlobal\preg_match_better('/(-?\d+)$/', $json_string, $matches)) { $parsed_json = json_decode($matches[1]); $json_start_index = $length - strlen($matches[1]); }
Commands
Glaser: Format Current File
Glaser: Format Selected Lines