Editing files
For some of the functionality you won’t even need to modify Beancount files directly. But if you want to get all the benefits and be able to understand what’s going on under the hood you will more than likely will need it.
Editing the files
This opinionated guide provides a pre-defined structure for the Beancount config and data files. You can edit any *.bean
files in the repository (except *.gen.bean
ones – you can edit them as well but expect these to be overwritten by the scripts). Some contain setup instructions and options, some contain actual data. The specifics will be described in following sections.
Fava allows to edit any of the included *.bean
files using editor right in the web interface. It supports syntax highlighting and auto-completion for your custom-defined accounts and tags. You can also edit transactions directly from the Journal page, and it may be quite convenient when you do it on a subset of transactions (e.g. filtered by a tag).
Most of the files you will need for the recommended setup here will be available for edit at Config tab. However, for any batch / complex changes, working with version control, etc, I would recommend using an external editor.
Editor
I personally use VSCodium / VS Code with the plugin to highlight syntax of the bean
files.
Analogous tools exist at least for vim (more info), Sublime Text, and others.
I’d recommend to acquire some fluency with editing text in the editor as batch-editing multiple lines in text will speed up your setup and doing any changes later. In case of VS Code or Sublime that means using things like multi-cursor and Ctrl/CMD + D
shortcut.
Tips
If you’re using VSCodium/VS Code plugin, org-mode style headers in Beancount files result in pretty helpful outlines (and a feature called Sticky Scroll) that allow you to jump around config or data files more easily. Larger files like main.bean
are already set up in this way.
YAML plugin also may be helpful for browsing/editing YAML files since it allows to show structure more easily (and outline works as well, although it’s not as clean).