VSCode extension for the text-based double-entry accounting tool Beancount
- Syntax highlight (syntax file from draug3n/sublime-beancount)
- Decimal point alignment
- Auto-completion of account names, payees, and narrations
- Auto balance checking after saving files
- Hovers with account balances.
- Code snippets (@vlamacko)
- Region folding - use indentation (#5), or special comments (#11). For org-mode style folding see vscode-org-fold
- (Experimental) Use Pinyin initial letters to input existing Chinese narrations and payees quickly. 使用拼音首字母快速输入现有的中文受款人和描述 。See details.
This extension contributes the following settings:
beancount.separatorColumn
: specify the column of the decimal separator.beancount.instantAlignment
: Set it totrue
to align the amount (like 1.00 BTC) once a decimal point is inserted.beancount.completePayeeNarration
: Controls whether the auto completion list should include payee and narration fields.beancount.mainBeanFile
: If you are splitting beancount files into multiple files, set this value to either the full path or the relative path to your main bean file so that this extension can get all account information. If it is left blank, the extension will consider the file in the current window as the main file.beancount.runFavaOnActivate
: If it is set totrue
, fava will run once this extension is activated.beancount.favaPath
: Specify the path of Fava if Fava is not installed in the main Python installation.beancount.python3Path
: Specify the path of Python if beancount is not installed in the main Python installation.beancount.fixedCJKWidth
: Set to true to treat CJK aka East Asian characters as two letters width on alignment.beancount.inputMethods
: List the input methods for auto-completion of payees and narrations with CJK characters. Currently onlypinyin
is supported. See details.
- Make sure you installed Python3 and
beancount. Set
beancount.python3Path
to the correct path. - Split your ledger into several
.bean
files according to time and put all youropen
/close
in a main file. - Include all other files in the main file by the
include
command in the main bean file. - Open
BeanFolder
with VSCode and setbeancount.mainBeanFile
to the full path ofmain.bean
in the current Workspace Settings.
For example, the file structure of your directory looks like this
BeanFolder
├── .vscode
│ └── settings.json
├── main.bean
├── before2017.bean
├── 2017-01.bean
└── 2017-02.bean
If you open .vscode/settings.json
, you should see something like this:
{
"beancount.mainBeanFile": "main.bean"
}
Now once BeanFolder
is opened as a workspace in VSCode, this extension will be
able to invoke beancount to check errors and calculate balances.
see GitHub issue page
- Add Inlay Hints for last legs of transactions with elided amounts @iamkroot
- Add support for multi-level code outline from headings @Ev2geny
- Allow syntax highlight in markdown @hotshotxwl
- Support opening files from 'include' directive by adding DocumentLinkProvider @mengqi92
- Add org-mode-fold to README.md @dumbPy
- oneliner version syntx with file suffix
.beancount.oneline
or.bean.oneline
. @Akuukis