DEV Community


Discussion on: How to search faster in Vim with FZF.vim

wulymammoth profile image

Nice write-up, Igor. I'd been using fzf for a couple years in Vim, but it was only recently (beginning of the year) that I discovered its powers as a CLI utility. If you're using bash along with fzf's bash/zsh-completion, it provides globbed search that you can prefix with many Unix utilities including ripgrep:

  1. open file in vim that is somewhere from current working dir: $ vim ** (followed by tab)
  2. open file in vim anchoring from a directory: $ vim foo/bar/** (followed by tab)
  3. search all files in current working directory (with ripgrep): $ rg --files | fzf
  4. change to a project directory (can't remember where): $ cd ** (followed by tab)

You're probably familiar with these as one of your links discusses fzf and ripgrep.

I just learned how to better to search/find-and-replace in multiple files from you. Thanks for that! I was just about to adopt more sed into my workflow to do this sort of thing, but the situation hasn't come up yet