Vim Macros for Beancount

https://news.ycombinator.com/rss Hits: 7
Summary

Here I try to describe performing a niche Beancount data manipulation by building up complex Vim Macros from basic Vim Motions. I am a long time user of vim: still a novice frustrated that I still opt to use the hjkl movement keys to navigate around without going deeper by committing the more sophisticated motion capabilities into muscle memory I have recently (in the last 4 years) have finances that are somewhat representative of a normal(ish) adult salary housing expenses bills maintenance insurance medical regular holidays I am often hit with brief periods of motivation to export transactions and fiddle around with assigning and summarising categories in spreadsheets. This is something I pretty quickly get bored with and lose interest, frustrated with the inflexibility and lack of (futureproof!) automation capability around tracking these things in a spreadsheet. I stumbled upon beancount, a Python concoction of scripts designed to generate, parse, lint a standard text based ledger. I got excited by the possibilities of text based bean counting. I am only starting my journey, and one onboarding strategy suggests taking a snapshot of your current balance and starting your bean counting journey from the here and now. This would allow ignoring the past (temporarily), and learning how to use the system incrementally, and presumably the cost of taking a wrong path/making a mistake is relatively low, because you would only have to go back and redo a small number of bean-keeping once you've realised you're going about things the wrong way. Thats not how I roll, and I have a strong, possibly misguided confidence in my ability to do bulk data manipulations quickly (it is entirely possible that it takes me just as long as anyone else, but I get so absorbed into the flow of it that I just believe I'm being quick and efficient). In the process of pulling the trailing, winding, branching, poorly documented thread of the last 3 years of transaction data from all the different ...

First seen: 2025-08-19 14:57

Last seen: 2025-08-19 21:02