Pattern-matching in vim solves my problem

I am gradually migrating passwords out of my old encrypted passwords.txt and into pass, as detailed here. Just so I can keep track of what has migrated and what has not, I prefix each migrated line in passwords.txt with the text "===". But these migrated lines are scattered all over a 700-line file. How can I gather the lines in one place so that I can quickly scan what I have migrated?

Using vi's pattern-matching rules, that's how. The following command matches all the lines prefixed with "===" and moves them to the bottom of the file.


Why to the bottom (m$) and not the top (m0)? Because this preserves the lines' ordering, so any multi-line entries stay in their original order and are easier to read.

Password management: at last, a simple solution

If I want to use Keepass on OSX then I need to install Mono and that galls.

Lastpass looks nice and shiny. I tried it for a couple of weeks but I found one too many sites with which it did not play nice (refusing to populate the fields on my bank's login screen, specifically) so no, that won't do.

I was about to use my old approach of using GPG to encrypt a big ugly text file when I came across pass. Now that looks interesting. It uses GPG, it has useful off-the-shelf functionality (add/edit/delete/copy to clipboard), and it has a flexible structure that allows one to manage additional PINs and security questions. Importantly, I do not decrypt every one of my passwords simultaneously when I just need one of them, which is a less than desirable side effect of my current approach.

I suspect that it will fit in nicely with the command line tools that I use to manage my to-do lists (Taskwarrior) and Engineer's Notebook (jrnl).

I shall install it and report back.