Commit graph

3483 commits

Author SHA1 Message Date
Johann Klähn
4d56417f75 vim. parse comments at eol in parse_body() 2010-09-15 21:18:23 +02:00
Johann Klähn
2a82edb9f0 vim. highlight metadata on same line as posting 2010-09-15 20:46:18 +02:00
Johann Klähn
4886646614 vim. fix off-by-one bug in ToggleTransactionState 2010-09-15 20:08:22 +02:00
Johann Klähn
453327a180 vim. fix issue with description in from_lnum()
Thanks to Chad Voegele, see mailing list ledger-cli@googlegroups.com:
  Whenever I had a transaction such as
  2010/09/10 * castle bar, nyc (beer)
  the transaction.from_lnum function would recognize (beer) as the code
  for the transaction which is incorrect since it comes at the end of
  the line.

Message ID:
73e397f4-234e-46fe-87e5-45f86f934bf1@k30g2000vbn.googlegroups.com
2010-09-15 20:03:27 +02:00
Johann Klähn
c2384b6046 vim. fix highlighting of comments at end of line 2010-09-13 13:09:17 +02:00
Johann Klähn
0f81c67c29 vim. change syntax file to allow comments at eol 2010-09-13 12:55:36 +02:00
Johann Klähn
86153f670d vim. remove tag completion for now 2010-09-12 14:23:30 +02:00
Johann Klähn
3a679a695d vim. avoid misinterpretion of 1 char words 2010-09-12 14:18:06 +02:00
Johann Klähn
1be3a79385 vim. check for most common case first (parse_body) 2010-09-08 23:29:36 +02:00
Johann Klähn
6c0ccd5ffd vim. add LedgerToggleTransactionState()
By using
  call LedgerToggleTransactionState(line('.'), ' *?')
the state of the transaction will toggle through:
  no state -> * -> ? -> no state -> …
beginning at what ever state it currently has.
Adjust to your liking.

Thanks to Chad Voegele for the suggestion.
2010-09-08 23:24:39 +02:00
Johann Klähn
58fcb0f30f vim. make sure cursor/line is on a transaction
Thanks to Chad Voegele for reporting and fixing this in
the first place.
2010-09-08 22:31:42 +02:00
Johann Klähn
019a60e6d1 vim. update s:get_columns() 2010-09-08 22:18:28 +02:00
Johann Klähn
e4060eb421 vim. get transactions in a range of lines 2010-09-08 17:34:38 +02:00
Johann Klähn
eea6f33a2e vim. fix return type of s:transaction.from_lnum() 2010-09-08 17:34:05 +02:00
Johann Klähn
f7f8432c52 vim. add function to parse postings 2010-09-08 14:48:28 +02:00
Johann Klähn
ae3a8b6e11 vim. add case of automatic transactions 2010-09-08 14:44:34 +02:00
Johann Klähn
84fea7f136 vim. reimplement function to change state
Note: You now have to provide the line number:
  call LedgerSetTransactionState(line('.', '*')
2010-09-08 10:23:06 +02:00
Johann Klähn
f8c804ac79 vim. allow use of 0 as timestamp
To remove the effective date you would now call the function like this:
  call LedgerSetDate(line('.'), 'effective', -1)
2010-09-08 10:10:09 +02:00
Johann Klähn
66b39c46d1 vim. add function to modify actual/effective date
This allows you to set the effective date in a convenient way.
Maybe I will add date selection using calendar.vim by Yasuhiro
Matsumoto. Until then, you can map this to use today's date:
  call LedgerSetDate(line('.'), 'effective')
2010-09-08 10:01:44 +02:00
Johann Klähn
cf40d1c9d7 vim. introduce basic transaction 'class'/concept 2010-09-08 10:00:17 +02:00
Johann Klähn
2dff4dea3f vim. add function to change item state ~ reconcile
To try this, map or call the following function:
  LedgerSetTransactionState('') – removes state
  LedgerSetTransactionState('*') – sets 'checked' state
  …

The logic used to distinguish the different parts
of the first line of a transaction is rather basic
but proved to work so far.
2010-09-07 21:05:08 +02:00
Johann Klähn
04f564f01c vim. use ledger print as 'formatprg'
You can now try to select some lines using V (visual mode)
and have them automatically formatted using gq
2010-09-07 17:59:26 +02:00
Johann Klähn
0570c9c416 vim. display warning messages in quickfix window
To use this option you must set g:ledger_bin = "ledger --strict"
before the compiler plugin is loaded (your .vimrc for example).
2010-08-14 12:24:46 +02:00
John Wiegley
eda6cbd014 Merge branch 'next' 2010-06-23 19:31:06 -04:00
John Wiegley
93807fade6 v3.0.0-20100623 (b2) 2010-06-23 19:31:01 -04:00
John Wiegley
97143abbde Remove use of --enable-cache in tools/push 2010-06-23 19:30:59 -04:00
John Wiegley
a995090b9e 'make check' for gcov shouldn't listen to -j 2010-06-23 17:51:11 -04:00
John Wiegley
8ced9df08f Added a command-line test runner named test/run 2010-06-22 21:57:23 -04:00
John Wiegley
e8e28c794b Added report query modifiers: for, since, until
Now instead of ledger reg expense -p "this month", you can say:

  ledger reg expense for this month

And as a shorthand for "for until this month", you can just say "until
this month" or "since this month".
2010-06-22 21:56:19 -04:00
John Wiegley
0648c2f6dc Extended feat-fixated-prices.test 2010-06-22 21:03:04 -04:00
John Wiegley
266dee564f Price annotation no longer inject an implied cost
Consider the following transaction:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage

Previously, this would have been equivalent to:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL @ $30
      Assets:Brokerage

However, this is not always what the user expects to happen.  When @ is
not being used, the transaction should reflect a mere transfer of
commodities.  This is now how it works, and thus the above transaction
is now equivalent to the following instead:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage      -10 AAPL {$30}
2010-06-22 20:56:35 -04:00
John Wiegley
1f3dba7756 Don't do cost finalization for auto/period xacts 2010-06-22 20:53:05 -04:00
John Wiegley
205dd3a1ee Added has_date() method to item_t 2010-06-22 20:51:18 -04:00
John Wiegley
26a94fb1ed The notions of "now" and "today" now use local time 2010-06-22 17:19:35 -04:00
John Wiegley
3f899c93e6 Added new "bold" modifier to query expressions
For example:

  ledger bal assets bold checking

Or you can use expressions:

  ledger bal assets bold '=total > 1000'

This last is identical to saying:

  ledger bal -l 'account =~ /assets/' --bold-if='total > 1000'
2010-06-22 03:20:24 -04:00
John Wiegley
7da2701295 Regression and generate tests now fail properly 2010-06-22 03:10:19 -04:00
John Wiegley
81bf38584e Added new --bold-if option 2010-06-22 01:27:05 -04:00
John Wiegley
7d005b8d98 Balances and sequences can be compared to amounts 2010-06-22 01:27:05 -04:00
John Wiegley
1c0785ce78 Fixed typo in previous commit's regression test 2010-06-21 18:35:51 -04:00
John Wiegley
963161a817 bal was sometimes reporting empty accounts 2010-06-21 18:32:03 -04:00
John Wiegley
2f1b1c8ced Change weighting of account-name abbreviation
Parent accounts are abbreviated even more, so that child accounts can
show more text.
2010-06-21 18:05:26 -04:00
John Wiegley
4ea4fa24a4 Added a regression test for the previous commit 2010-06-21 17:54:26 -04:00
John Wiegley
d792cc0ffc Corrected a major flaw in the transaction finalizer
When a transaction has two commodities, but also a null posting, no
attempt should be made to resolve the costs in terms of the primary
commodity.
2010-06-21 17:44:19 -04:00
John Wiegley
fcfa491485 Improvements to time period parsing
Things like "since last month" and "4 weeks ago", and "since 4 weeks
ago" are now all working.
2010-06-21 17:02:48 -04:00
John Wiegley
009e07690d Added tests for sole budget/forecast reports 2010-06-21 13:25:17 -04:00
John Wiegley
9d9a8bd83d Corrected a compilation warning 2010-06-21 13:20:44 -04:00
John Wiegley
b514b34120 Fixed an incorrect path in tools/proof 2010-06-21 12:02:43 -04:00
John Wiegley
1ee16304b4 Transactions no longer needed for budget/forecast
This means you can forecast or budget against a file containing only
periodic transactions.
2010-06-20 20:58:07 -04:00
John Wiegley
7b6cc4c365 Output budget even if no postings directly matched 2010-06-20 20:55:24 -04:00
John Wiegley
96b652310c Don't warn about --import in doc when --no-python 2010-06-20 20:35:35 -04:00