Lencerf / vscode-beancount

VSCode extension for Beancount
https://marketplace.visualstudio.com/items?itemName=Lencerf.beancount
MIT License
171 stars 35 forks source link

VSCode-Beancount

VSCode extension for the text-based double-entry accounting tool Beancount

version downloads installs rating license

Features

  1. Syntax highlight (syntax file from draug3n/sublime-beancount)
  2. Decimal point alignment
  3. Auto-completion of account names, payees, and narrations
  4. Auto balance checking after saving files
  5. Hovers with account balances.
  6. Code snippets (@vlamacko)
  7. Region folding - use indentation (#5), or special comments (#11). For org-mode style folding see vscode-org-fold
  8. (Experimental) Use Pinyin initial letters to input existing Chinese narrations and payees quickly. 使用拼音首字母快速输入现有的中文受款人和描述 。See details.

Extension Settings

This extension contributes the following settings:

Recommended practices

  1. Make sure you installed Python3 and beancount. Set beancount.python3Path to the correct path.
  2. Split your ledger into several .bean files according to time and put all your open/close in a main file.
  3. Include all other files in the main file by the include command in the main bean file.
  4. Open BeanFolder with VSCode and set beancount.mainBeanFile to the full path of main.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.

Known Issues

see GitHub issue page

Release Notes

0.12.0 (2024-09-15)

0.11.0

0.10.0