When I use hledger, I am almost always on the command line.
So, I find it useful to know ways to be more efficient on the command line. For example, to save time when I need to reuse a command, I press the up arrow key until I find the command that I need to run again. There is no need to type the whole command a second time letter by letter. I just find the previous command and press the enter key. That works well in cases where the command that I am looking for is not too far back in the command history.
However, there is a trick to instantly jump back to a previous command, no matter how far back it is. Specifically, it’s Control + R. If you use the standard Emacs key configuration, this should be an easy combination to remember, as in Emacs it’s how to search backward through text.
Here is specifically how I used Control + R. I needed to add a transaction, for which I would use the “add” command. However, between the time I had entered the last “add” command and the point I had found myself needing to enter the same command, there were many intervening commands.
Yes, I could have pressed the up arrow repeatedly, but I decided to try the Control + R method instead. I then typed “add” (without the quotation marks). There was my command. I chose the command and executed it. No tedious searching with the up arrow for a command that is perhaps 15 places back in the command line history.
The above falls in the category of an incremental improvement, and I am happy to keep making incremental improvements as they add up over time.
Website under construction
Speaking of incremental improvements, we have one for this blog. I am trying out a new theme, which seems to work better. There are several other improvements needed, so the website is still very much a work in progress.