Hi there, I've been using ledger for a few years now and share a similar enthusiasm to Martin Blais (I've been reading archives to update my current best practices and can sense his passion in the emails he writes :)). I've stumbled on this thread from a few months ago and thought I'd contribute what I do which may help with this substitution/alignment issue.
> I've just been living with the mess for the most part, but sometimes when I > do that kind of rename I'll include the whitespace of the longer account so > it remains aligned; it's a bad solution however, doesn't always work. I'm using ledger-cli, and for transaction lines, I use a space-indented prefix, followed by account name, then a tab, then the tx amount. Using vim, and setting tabstop to a wide value (say 60 for me), this results in perfectly aligned tx account and amount values throughout a whole ledger file. e.g 2014/08/18 Payslip <sp><sp>Assets:Bank:Savings<tab>$200.00 <sp><sp>Income:Job:Employer<tab>$200.00 If you are mass replacing, a sed expression like: sed -i -e 's/^ Income:Job:Employer\t/ Income:Job:RenamedEmployer\t/' savings.ledger doesn't alter the alignment at all :) And you could easily write some sugar-shell to reduce the inputs to just "oldname newname" and have the script deal with the spec. Don't know if that helps anyone that is having trouble with aligning, but it's been non-issue with what I do above. Regards, Chris -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
