Inline comment alignment — align trailing ; comments to a column
Smart date sorting — sort entries by date (asc/desc) with time metadata intra-day ordering, timeless-entry positioning, and directive-type sort barriers
Fast — powered by a WASM-compiled Rust core
Usage
Open a .bean or .beancount file
Format via Shift+Alt+F (or Shift+Option+F on macOS), or enable format on save:
Column to align inline comments (;) to; 0 disables alignment
beanfmt.thousandsSeparator
"keep"
Thousands separator: "add", "remove", or "keep"
beanfmt.spacesInBraces
false
Add spaces inside cost braces
beanfmt.fixedCJKWidth
true
Treat CJK characters as double-width for alignment
beanfmt.sort
"off"
Sort entries by date: "off", "asc", or "desc"
beanfmt.sortTimeless
"keep"
Where to place timeless entries within a day: "begin", "end", or "keep"
beanfmt.sortExclude
[]
Directive types to exclude from sorting; excluded directives act as sort barriers
Note: These settings are ignored when a .beanfmt.toml or beanfmt.toml exists in the workspace — the config file is the source of truth. See the project README for the config file format.
中文
一个快速的 Beancount 文件格式化 VS Code 扩展,支持 CJK 双宽度字符对齐和智能日期排序。
功能特性
列对齐 — 自动对齐货币和成本标注
CJK 感知 — 正确处理中日韩双宽度字符的对齐
千位分隔符 — 添加、移除或保留数字中的逗号
花括号空格 — 控制成本花括号内的空格 { ... }
行内注释对齐 — 将行尾 ; 注释对齐到指定列
智能日期排序 — 按日期排序条目(升序/降序),支持 time 元数据的日内排序、无时间条目定位以及按指令类型设置排序屏障