-
I am using a lot of live_grep with a lot of exclusions like this I want to be able to have sets of those exclusions and switch between them while using live_grep Ideally I'd have a keymap that pops open the picker with prefilled exclusions and puts the cursor right between I tried passing search opt to live_grep, but it puts the cursor at the end. Can anybody hint at a right direction here? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 22 replies
-
There are many ways to go about this problem, one way I can think of is crafting your own
You can send Another option is to open :lua require'fzf-lua'.grep({ no_esc=true, rg_glob=true, search=' -- *.lua' }) |
Beta Was this translation helpful? Give feedback.
-
Found your ideal solution using fzf's :lua require'fzf-lua'.live_grep({
no_esc=true,
rg_glob=true, search=[[\b\b -- *.lua]],
keymap = { fzf = { start = "beginning-of-line+forward-char+forward-char" }}
}) We can also use the "dotted" format for a slightly shorter command: :lua require'fzf-lua'.live_grep({
no_esc=true,
rg_glob=true, search=[[\b\b -- *.lua]],
["keymap.fzf.start"] = "beginning-of-line+forward-char+forward-char"
}) For more options to send to fzf, |
Beta Was this translation helpful? Give feedback.
Found your ideal solution using fzf's
start
event:We can also use the "dotted" format for a slightly shorter command:
For more options to send to fzf,
man fzf
and search forAVAILABLE ACTIONS
:https://github.com/junegunn/fzf/blob/4e9e842aa4…