aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/beancount.vim (follow)
Commit message (Collapse)AuthorAgeLines
* Replace AlignCommodity with bean-formatWynn Wolf Arbor2020-04-28-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix a regression bug in AlignCommodityZhuoyun Wei2017-09-12-1/+1
| | | | | | | | | | 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.
* fix remaining lint issuesJakob Schnitzer2017-03-20-16/+16
|
* remove unnecessary option; lint and minor improvementsJakob Schnitzer2017-03-20-16/+28
| | | | | | | | | 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.
* lint align_commodityJakob Schnitzer2017-03-20-18/+18
|
* autoload/beancount.vim: lint and remove trivial functionsJakob Schnitzer2017-03-20-59/+27
|
* deoplete: use b:beancount_rootJakob Schnitzer2016-11-21-7/+7
|
* Add caching back to python3 autocomplete implementationJason Chu2016-11-13-1/+2
|
* Add support for completing event typesJason Chu2016-11-07-2/+13
| | | | Only works in python3 because bean-query doesn't expose event types
* Fix off-by-one error in initial line matchingJason Chu2016-11-07-2/+2
|
* Add support for python3Jason Chu2016-11-07-5/+56
| | | | Using beancount in process instead of shelling out to bean-query.
* Remove errant print statementJason Chu2016-11-07-1/+0
|
* Improve flag supportKonstantin Mikhailov2016-10-07-1/+1
| | | | | | | | | | 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.
* Support whole numbers in align commodityNathan Grigg2016-10-01-10/+5
| | | | | | | | | 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.
* Fix AlignCommodity to work with balance and priceKonstantin Mikhailov2016-10-01-1/+1
| | | | Closes #21 and #24. Supports dates with slash separator.
* Improved autocompleteJason Chu2016-09-05-44/+128
| | | | Merge pull #22
* Add a function to display the current line's beancount context in a scratch ↵Jason Chu2016-06-12-0/+9
| | | | window
* Do not allow account names to end in colons (AlignCommodity)Nathan Grigg2015-06-22-1/+1
|
* add vim-ledger style completion as an optionJohann Klähn2015-05-27-3/+23
|
* Follow include statements when completing accountsNathan Grigg2015-05-15-11/+55
| | | | | | | | | | 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.
* Fix regex for omnicompletionNathan Grigg2014-12-30-1/+1
|
* Add omnicomplete function for account namesNathan Grigg2014-11-21-0/+28
|
* AlignCommodity and IncomingNathan Grigg2014-10-07-0/+38