-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[help] How to send all results—selected or not—to quickfix? #546
Comments
Duplicate of #324, take a look and see if that solves your issue. |
Thank you @ibhagwan! local fzf_lua = require('fzf-lua')
fzf_lua.setup({
winopts = {
split = "botright new",
},
grep = {
actions = {
["default"] = "select-all+accept"
},
},
}) but when I press enter in the |
Not sure if I understand what you mean, can you elaborate or better yet post a screenshot so I can understand what you mean by:
|
The terminal window that opens is fzf-lua’s grep window, it lets you fuzzy match the results and then you can select a few items and press If you wish to skip the fzf-lua terminal window then you can use Also, something is off with the preview in your screenshot, or should align perfectly on the bottom right side of the split but the layout is totally off, can you post your full |
I see now, you are right! I'm just primed into thinking in terms of "command > output > quickfix", and then operate on it, by jumping or by You are right, in this case I could just use the right combination of Synchronous used to be OK, but when I started working on embarrassingly large repositories, that no longer cut it. So I found that https://github.com/mhinz/vim-grepper solved the issue, because it populates the I guess I'll stick to it for a little longer—even it's not in Lua 😉—and use Regarding the wonky preview in the screenshot, the one I posted above is my full setup, it's only wonky because for some reason I resized the term window with the mouse, but they were initially the same height, so no problem there 🙂 |
PS: thank you so much for your friendly feedback, hugely appreciated! |
Yes.
Happy to know it’s not a bug :) |
Hello, it seems this isn't working in the latest version - the syntax has changed. I'm attempting to accomplish the above with this:
But it seems that "select-all+" isn't actually working. Am I doing this incorrectly? I don't see an action for select_all. |
There isn’t an fzf-lua action to select all, this is an fzf (the binary) action, this prefix’s the fzf-lua action with a “select all”. |
@jsbmg, you're mixing up a few things, if you wish to send all results to quickfix, take a look at #324, use : grep = {
keymap = { fzf = { ["enter"] = "select-all+accept" } },
actions = { ["default"] = { actions.file_edit_or_qf },
}, The reason this works is because the keys are first interpreted by fzf which in turns selects all items and "accepts" (i.e. fzf exits and sends all selected items as output), fzf-lua will then interpret the action with "enter" being the default action, |
@ibhagwan makes perfect sense now. Thank you! |
Hi, I was looking in the docs and in
actions.lua
, to see if I could change the default action for the non-interactive:FzfLua grep
. I would like to reproducevim-grepper
's behaviour, that is, directly send all the results to the quickfix. Is it possible? Thanks!The text was updated successfully, but these errors were encountered: