ditching the vim fuzzy finder plugin part 2: :grep
This post is a continuation of my last post on ditching the Vim fuzzy finder plugin. In that post I covered file name search with :find and :buffers. In this post I will cover file content search with :grep.
»ditching the vim fuzzy finder plugin part 1: :find
if you’re moderately acquainted with (n)vim you will have heard of the group of plugins called “fuzzy finders”. They’re very useful tools for searching for and selecting an entry from an arbitrary list of strings using a fuzzy matching algorithm. They can be used for a wide array of different useful searches, but when I used one most of my searches essentially boiled down to:
»file navigation with the vim arglist
One of the hardest things to wrap your head around when starting out in Vim is how to navigate files efficiently. A specific situation that can be frustrating is when you’re navigating often between 3 or 4 files. You may navigate away from those files but regularly return to them. If you’re doing something like iterating over a long quickfix list, or following a chain of several function definitions, using the jumplist to navigate back can be tedious. You could search through your buffer list, but if you have lots of open buffers in a code base with many similarly named files this might not be very efficient. Maybe you’ve tried using global marks, but with too many files the cognitive load of recalling which mark letter you want is inconvenient.
»neovim in <50 lines
Neovim configs have a tendency to go off the rails. I think some amount of this has existed for a long time with Vim, but with Neovim it feels particularly exaggerated. At this point the giant bloated configs have become a part of the Neovim culture. To me it seems we’ve strayed pretty far from the minimalist philosophy of Vim once configs start requiring nested file structures and lazy-loaded plugins and whatever else is getting cooked up lately.
»