I’ve been using Calibre to convert epubs and pdfs without images to .txt, and reading them in less. you can search for any string with / and in less, the v key opens $EDITOR, and you can add a —bkm to search for next time you’re reading, or add “margin notes” in [[ ]] brackets.