Closed linrongbin16 closed 1 year ago
You can define a new function similar to the built-in :Rg
and pass the glob pattern to the rg
command.
Concretely, notice the :Rg
definition: fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(<q-args>), fzf#vim#with_preview(), <bang>0)
. You can break up the <q-args>
to use the first as the glob pattern and the rest to fzf#vim#grep
. See :help <q-args>
.
Alternatively, from Lua, you can abstract the glob as a function argument and call fzf#vim#grep
with vim.fn
like this. (Note the glob pattern is not abstracted in the example and the second argument has_column
is deprecate. You might need to change it according to your version of fzf.vim
.)
https://github.com/linrongbin16/fzfx.vim
finally support in this plugin
Also notice that we now have grep2
.
https://github.com/junegunn/fzf.vim/commit/87b60bb133032056fda105e0ce6f5d64436926dd
Hi,
I want to configure live grep (just like fzf-lua and telescope.nvim) with
--glob
support. Because search text with filetype filter is a big needs to me, how could I do that?There're two relate plugins support this mode: