News for hackers. Stuff that matters.
Re:Fzf – a command-line fuzzy finder by otikik on Sunday March 20, 2022 @06:06AM (#30741447)
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.

Re:Fzf – a command-line fuzzy finder by _dain_ on Sunday March 20, 2022 @08:05AM (#30741969)
>I occasionally use it in the command line, by expanding *.

You can use zsh's fzf-tab as a supercharged tab-completion. e.g. you can just do

  some-command <TAB>
and it will put a fzf interface where the tab-completions would usually be, and you can pick whatever files you want. And if you instead do

  some-command -<TAB>
it will instead show you all the possible flags and their descriptions, which you can also pick from.

I use this all the time on the terminal now. It cuts out so much pointless flow-breaking invocations of ls and man and --help.

Re:Fzf – a command-line fuzzy finder by infinitezest on Sunday March 20, 2022 @07:51AM (#30741889)
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.

Re:Fzf – a command-line fuzzy finder by CZiNTrPT on Friday March 25, 2022 @02:39PM (#30805656)
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 by JetSetIlly on Sunday March 20, 2022 @06:45AM (#30741600)
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.
Re:Fzf – a command-line fuzzy finder by petepete on Sunday March 20, 2022 @07:13AM (#30741700)
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

Re:Fzf – a command-line fuzzy finder by CZiNTrPT on Friday March 25, 2022 @02:39PM (#30805664)
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 by petepete on Friday March 25, 2022 @07:26PM (#30807941)
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 <C-q> to send them to your quickfix list.

Re:Fzf – a command-line fuzzy finder by otikik on Sunday March 20, 2022 @04:56PM (#30746527)
Wait. What. Just tried that. It worked. I must have missed it when I installed the plugin. Thanks a lot! I can now remove a bunch of stuff from my config file :)
Re:Fzf – a command-line fuzzy finder by jobegrabber on Sunday March 20, 2022 @06:15AM (#30741471)
I bind Ctrl-J to ":Ag " so I'll simply have to type in roughly what I'm searching for and then get the pop-up to refine the search and do selections.

I imagine you have a similar approach, what's clunky about it for you?

Re:Fzf – a command-line fuzzy finder by otikik on Sunday March 20, 2022 @08:24AM (#30742075)
Lack of auto completion on filenames/dirs. Not seeing results while I type, like with fzf