Package sublime-beancount now live in Package Control for Sublime Text

191 views
Skip to first unread message

Martin Andreas Andersen

unread,
Sep 22, 2014, 6:21:09 AM9/22/14
to bean...@googlegroups.com
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

Martin Blais

unread,
Sep 23, 2014, 11:09:36 PM9/23/14
to Martin Andreas Andersen, bean...@googlegroups.com
That's very cool! :-)
I'll add a link to the resources section of the readme page and in the docs.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/28844412-5210-4ee7-80b7-8e8d9a563089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

joshua...@gmail.com

unread,
Aug 1, 2016, 8:53:30 PM8/1/16
to Beancount, martin.andr...@gmail.com
Hate to grave dig, but I wanted to bring to light getting the auto-complete function mentioned in the original thread going. An issue has been opened up on Github for anyone interested in helping out: https://github.com/draug3n/sublime-beancount/issues/5
Reply all
Reply to author
Forward
0 new messages