diff options
-rw-r--r-- | ledger.texi | 5 | ||||
-rw-r--r-- | ledger.vim | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ledger.texi b/ledger.texi index 87684ff5..45f5e1ee 100644 --- a/ledger.texi +++ b/ledger.texi @@ -2716,8 +2716,9 @@ Relatedly, your Income accounts show up negative, because they transfer money @emph{from} an account in order to increase your assets. Your Expenses show up positive because that is where the money went to. The combined total of Income and Expenses is your cash -flow. A negative cash flow means you are spending more than you make. -To see your current cash flow, use this command: +flow. A positive cash flow means you are spending more than you make, +since income is always a negative figure. To see your current cash +flow, use this command: @example ledger balance ^income ^expenses @@ -24,9 +24,10 @@ highlight default link transDate Question " folding: how to represent a transaction in one line. function! MyFoldText() - let line = strpart(getline(v:foldstart), 0, 65) + " get the amount at the end of the second line let line2 = getline(v:foldstart+1) - let line2 = substitute(line2, ".* ", "", "") + let pos = match(line2, "[0-9.]*$") + let line2 = strpart(line2, pos) let pad_len = 80 - strlen(line) - strlen(line2) if (pad_len < 0) then pad_len = 0 |