I've been doing something similar using jrnl. I use hashtags so I could theoretically look up stuff in the past.
I.e.
> jrnl "@vim type _:noh_ to remove the last search's highlighting"
And then a week later when I can't remember, I could use
> jrnl -n 10 -and @vim