However as I don't use this in daily life I pretty much lost all the knowledge again :)
I add "topic:...", "date:..." and "keyword:" lines in each file, grep through the files to list all topics or sort by topic and group notes by topic/keyword. I also keep the date I started the note in the filename itself.
I just need a good way to search through them on my phone.
You can use Dnote web app on the phone to do full text search and list notes by book. You can also install the website as a progressive web app for usability.
On the downside, using this web interface subjects users to a third party system (albeit open source) and forces them to give up the autonomy that they enjoy by simply using plaintext files.
Nice idea. How are you doing that? Also, do you version control your notes?
> What does not work great is on the phone
I maintain an open source project called Dnote (https://github.com/dnote/dnote) which solves this problem for you. It's basically a command line notebook using SQLite + a mobile friendly web interface to which you can sync your notes.
Agree with you that we should avoid being locked into a proprietary formats or platforms. Businesses and platforms come and go, but our notes should stay as readily accessible as possible.
The following program prints "Hello, world!"
The following prints 25th Fibonacci number: