Yeah if you can't locate code you wrote in your own home directory, I dunno what to tell you mate. I'm not here to tell you not to continue your love affair with reverse history search. Do what works for you. All I did was share the easiest way I know to persist a history item as a fn or alias.
Ctrl-R serves a mnemonic purpose as well.. it helps you document your workflow and processes at the shell, and not hidden in some file somewhere.