{"by":"darrenldl","descendants":17,"id":39903267,"kids":[39904972,39905934,39906087,39907105],"score":44,"text":"Think interactive grep for text files, PDFs, DOCXs, etc, but word&#x2F;token based instead of regex and line based, so you can search across lines easily.<p>Docfd aims to provide good UX via integration with common text editors and PDF viewers, so you can jump directly to a search result with a single key press.<p>---<p>I originally wrote this tool to help me dig through text&#x2F;markdown notes, since very often I want to search for a phrase of sorts that may span across multiple lines, but constructing the corresponding multiline regex is a bit painful (especially painful if I want to account for fuzziness), and I still have to guess the ordering of the words. Furthermore, I&#x27;d still have to sift through all the results, even the irrelevant ones.<p>fzf&#x27;s core is kinda there for some cases, but I want the fuzziness to be constrained around each individual word, i.e. each word matching some other word of +&#x2F;- N edit distance, instead of this whole line matching other whole line +&#x2F;- N edit distance or other metric. And fzf also doesn&#x27;t do multiline as far as I can tell (or I&#x27;m being silly).<p>Since nothing quite fit my taste, I decided to make something with a relatively straightforward UI&#x2F;UX (I gave up on many tools purely because I cannot be bothered to remember yet another set of keybindings), ranks all the results for me using a &quot;pretty alright&quot; heuristic, and allows me to open the file to the search results easily.<p>Support for PDF (via pdftotext) and DOCX etc (via pandoc) were added later on based on suggestions I got from Reddit users despite my initial reluctance. But after eating my own dog food for a while I have to say they were very right.","time":1712043820,"title":"Show HN: Docfd: TUI multiline fuzzy document finder","type":"story","url":"https://github.com/darrenldl/docfd"}