Sync text files (.txt) between iPhone and Mac; and edit (in-place), and search them on iPhone
I keep notes in text files (.txt) in a folder. I want to be able to edit and search these on my iPhone. I currently use VS Code to edit the text files on my Mac.
Currently, I sync them via Dropbox. The Dropbox iOS app allows me to edit text files on my iPhone, but I can't search the text files' contents, unless I upgrade to a paid plan (minimum C$16 / month).
I tried Google Drive, but it doesn't allow me to edit text files on iOS. But I can search them. So this is the opposite problem that I have with Dropbox.
Is there another solution that I can use, which allows me to edit text files on my iPhone, synced from my Mac, and search their contents? I'm willing to pay up to $10 for a one-time iOS app, or up to $5 per month, for this ability.
Evernote is the app you are looking for. It comes with native apps for macOS and iOS along with a nice and fully functional Web app. It supports attaching text files, in-place editing, and has an excellent search functionality.
The basic (free) version should suffice for your needs, and comes with free 60 MB of monthly uploads, 25 MB of maximum note size, and sync for 2 devices. The premium plan costs less than $5 a month and boasts of a whole lot of upgrades.
Disclaimer: I have no affiliation to Evernote, and use the app sparingly, but know that the said features work in a decent manner.