I have now added my Sublime Text helper package for Beancount to Package control (
http://sublime.wbond.net). Search for "Beancount" :)
These are still early days. So far, I have a working syntax definition and a build system, which both expect files with the .beancount extension.
The syntax definition knows about:
- Directives
- Payees
- Narratives
- Flags
- Currencies
- Amounts
- Tags
- Links
- Lots
- Prices
- Costs
- Root accounts
- Accounts
I have written the syntax definition explicitly, so any text not captured by the parser is flagged as invalid (and the pipe in txns is flagged as deprecated). This does mean that org-mode 'overloading' gets flagged. I could style this as well (especially useful if i can wrangle ST to allow folding by org-mode sections - more research is needed, but so far it seems ST only does indent-level folding :/).
The build system runs bean-check on the current file. The line numbers in the output are clickable, and take you to the erroneous line.
Going forward, things I could see being useful, in no particular order:
- context-specific autocomplete for accounts, limited to accounts from "open" directives, and only displaying direct descendants
- journal prettification, specifically aligning by decimal points inside transactions. Currently leaning toward padding against the longest account name in the transaction, but I can see the appeal of going for longest account in document too
- running reports inside ST, with output to a scratch buffer
No timeframe for this however - I am learning python as I go here :)
--- Martin