Live data from Hacker News

Fzf – a command-line fuzzy finder

github.com

91–93 of 93 posts

Re: Fzf – a command-line fuzzy finder

#91
post #58

It has replaced vim’s “open file” and “switch to buffer” for me. I occasionally use it in the command line, by expanding *. Not that often as in Vim, but very useful. I still need to find a satisfactory way to do “find in files” with vim. I use a custom script to call ag and it’s enough, but a bit clunky at times.

If you're using neovim I suggest checking out telescope.nvim. In addition to searching for files, it comes with a Live Grep mode for searching the current buffer (or all files in a given directory). For find and replace, I use spectre.

I also use telescope, but I never found a way to search for a couple of words that are near each others (like on start and end of a line eg)

Does that work for you? I thought that's what a fuzzy finder is

Re: Fzf – a command-line fuzzy finder

#92

Earlier quoted context omitted.

If you're using fzf.vim ( https://github.com/junegunn/fzf.vim ) then you can use :Rg or :Ag. This will run ripgrep or silver-searcher and present the results in a fuzzy finder window.

This is great when you want to jump to a specific place. I also use vim-grepper (mapped to leader-g) for finding in files and populating the quickfix list. https://github.com/mhinz/vim-grepper

I never found a way to search for a couple of words that are near each others (like on start and end of a line eg)

Does that work for you? I thought that's what a fuzzy finder is

Re: Fzf – a command-line fuzzy finder

#93

Earlier quoted context omitted.

This is great when you want to jump to a specific place. I also use vim-grepper (mapped to leader-g) for finding in files and populating the quickfix list. https://github.com/mhinz/vim-grepper

I never found a way to search for a couple of words that are near each others (like on start and end of a line eg) Does that work for you? I thought that's what a fuzzy finder is

I tend to use fzf for jumping rather than searching. To jump to a single instance you'd just type in some letters from each word and hit enter.

If I wanted all occurrences of lines that match a pattern I'd use vim-grepper (which uses Ag or ripgrep under the hood) and search with a regex.

If you're using Telescope you can use your fuzzy search to find the lines you want then use to send them to your quickfix list.

Post reply on HN