3 ms·
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 u
by otikik 5y ago
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.
- jobegrabber 5y agoI 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?
- otikik 5y agoLack of auto completion on filenames/dirs. Not seeing results while I type, like with fzf
- JetSetIlly 5y agoIf you're using fzf.vim (https://github.com/junegunn/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.
- petepete 5y agoThis 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 https://github.com/mhinz/vim-grepper
- CZiNTrPT 5y agoI 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
- petepete 5y agoI 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.
- otikik 5y agoWait. 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 :)
- infinitezest 5y agoIf 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.
- CZiNTrPT 5y agoI 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
- _dain_ 5y ago>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.