5 ms·
Vim Macros for Beancount
- xz18r 1y agoAlso check out beancount-mode for emacs: https://github.com/beancount/beancount-mode https://github.com/beancount/beancount-mode
- xarcolade 1y agoI've been struggling to on-ramp and sustain using Emacs for a while now. The paradigm shift from vim for me is frustratingly vast. I know I just need to give it the same patience I gave vim many years ago :)
- FriarTech 1y agoWas in the same boat as you a couple of years ago. Now I use both daily. eMacs for GTD and vim for coding. I don’t like using a system without both installed :)
- djhworld 1y agoI really wanted to like the vim-beancount plugin but it's just too buggy for me, so I've always just come crawling back to beancount-mode in emacs. It's the only thing I use emacs for and I use evil mode for vim keybindings :)
- Bengalilol 1y ago[flagged]
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- icy 1y agotangled being in alpha has no bearing on the submitted content whatsoever. i’m confused by this comment. the author being anonymous doesn’t matter either? there’s tons of good software written by pseudonymous authors. i don’t understand what the “federation risks” even means so i won’t bother. the last point is a bit of a giveaway that this is llm generated and you didn’t actually click on the link yourself. fwiw the code is entirely available for you to look at.
- Bengalilol 1y agoMy excuses. I went too far (and too quickly) (Yes, I used a LLM to check it and copy paste without any review, all shame on me)
- weepingwi11ow 1y agohttps://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-slops/ https://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-s...
- AnthOlei 1y agoDoes anyone else think this method of discourse incredibly rude? This poster posted a quasi researched comment that looks surface credible. A HN user took the time to respond to each point - only for the response to the response to be “whoops sorry, wasted your time!” Feels like a breach of social contract. I used to see help requests that were well written as a signal of effort - as in “I’ll put in the effort to help since they did”
- soupbowl 1y agoIt was rude and HN would be better off if you just stopped commenting if your level of effort is this low.
- xarcolade 1y agoHello! Sharing on HN is a first for me. When I wrote this I thought I was producing something with a steady enough on-ramp that someone could follow along with a little bit of sustained curiosity. After sharing it with some friends I realise it might still be a steeper/poorly constructed ramp than I initially thought. Either way I'd love to hear from you if you found this interesting!
- vanous 1y agoVery cool! A while ago i did something similar and tried to learn vim more in depth by creating some more complex macros - several of them, to convert some text snippets into markdown. Problem was, that several months later i could not exactly remember some details of these "reusable" macros - where exactly to place cursor when starting them, the order of execution and so on. Thankfully, vim has the amazing ability to run commands/script on text selection, so i rewrote my macros in a scripting language. It has several bonus points: i can store them in git and track changes, code can be self-documented via comments. My macros were not too complex, but still, using a proper scripting ended up being much better.
- aidenn0 1y agoMacroing Tip: whenever possible start a macro with a motion that will move the cursor to a known location. E.g. for line-oriented macros use "0" and for paragraph oriented macros use "}{". Then the macro will work regardless of where you put the cursor.
- xarcolade 1y agoPerfect! Great advice
- xarcolade 1y agoInsightful! I have had the same issue with forgetting where exactly I need the cursor. I did not know you could run script/commands on text selection, I will definitely look into this. The extent of my vimscript journey so far is directly making system() calls to external scripts, and I've been using the ability to Ctrl-R while entering a :command to dump yanked text as a crutch. Your approach sounds much more sensible.
- njt 1y agoJust wanted to chime in on my beancount workflow, which you may also want to check out. I also use vim, and I use it a bit to edit my beancount files, but I mostly use fava, a most excellent web interface for beancount. In addition to having a built in editor (which does formatting and can catch errors and show you exactly where they are), it allows you to quickly add new transactions based on old ones — the dialog box allows you to choose from previously used accounts to speed up input. It’s a lifesaver. I don’t think I would have continued using beancount long term if it wasn’t for fava. Just about the only negative thing I can say about fava is that it does formatting slightly differently from bean-format. I actually prefer it to beancount, but there are some cases where I prefer the native formatting (like when declaring/opening accounts). So for some months, I will switch from one to another. A minor nitpick, but it’s slightly annoying.
- johntash 1y agoFava is great. My only problem is that I was lazy and haven't imported anything for at least 2 years, and now it feels too daunting to try and catch up.