| Commit message (Collapse) | Author | Lines |
|
AlignCommodity replicates the functionality of the bean-format command
that is shipped with beancount itself. Therefore, we can fully replace
it by having vim invoke bean-format through formatprg.
Even though bean-format's output might differ from AlignCommodity in
significant ways, we feel that using one unified tool is superior to
having several (possibly incompatible) custom implementations. That way,
if bean-format is improved upon in the future, all downstream consumers
profit. For regular usage, however, this change should be transparent.
Note that while bean-format supports a few different ways of formatting
the ledger, we have opted to hard-code one specific setting. This will
match the default behaviour of fava, aligning currencies in column 61.
Managing the arguments passed to bean-format dynamically is considered
out of scope, especially given the fact that the user need only override
formatprg to get a custom setting.
This commit will also drop the g:beancount_separator_col variable and
the tests for AlignCommodity. Ideally, testing will now done upstream
for bean-format itself.
|
|
Since commit e17eb3d, putting a plus sign before a number causes
:AlignCommodity to behaviour incorrectly. A reproducible example:
Assets:Cash -100.00 USD
Expenses:Food +100.00 USD
This commit fixes the regression bug.
|
|
|
|
Beancount only supports '.' as decimal separator so making the decimal
separator configurable doesn't serve any purpose and might confuse
users.
Make the regular expression matching in beancount#align_commodity a bit
more precise.
|
|
|
|
|
|
|
|
|
|
Only works in python3 because bean-query doesn't expose event types
|
|
|
|
Using beancount in process instead of shelling out to bean-query.
|
|
|
|
Beancount allows to attach flags to transactions and even to the
postings themselves. At the moment it supports 12 different flags. Full
list can be found in beancount sources
https://bitbucket.org/blais/beancount/src/tip/src/python/beancount/parser/lexer.l?fileviewer=file-view-default#lexer.l-199
The commit updates syntax highlighting and AlignCommodity function to
respect all flags.
|
|
The original implementation first looked for a decimal point and then
fell back to whole number search, but this meant that a decimal in the
price part of the directive would steal focus from the leading whole
number.
Fixes #14.
|
|
Closes #21 and #24. Supports dates with slash separator.
|
|
Merge pull #22
|
|
window
|
|
|
|
|
|
Uses Python script to seek through multiple files for accounts,
following 'include' statements. The list of accounts is cached to
'b:beancount_accounts'. You can specify the root file using
'b:beancount_root', and if this is not set, we assume the current file
is the root. Included files that are not found are silently skipped.
Closes #5.
|
|
|
|
|
|
|