-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Live grep example #15
Comments
You could create a custom sink. Maybe something like this: local M = {}
function M.edit_ag_selection(selection)
if not selection then
return
end
local parts = vim.split(selection, ':')
local path = parts[1]
vim.cmd('e ' .. path)
end You'd put it somewhere in your
|
Works like a charm. I just replaced local path = parts[1]
vim.cmd('e ' .. path) with local path, line = parts[1], parts[2]
vim.cmd("e +" .. line .. " " .. path) Is such a live grep sink something you would consider adding? I can additionally test with |
Adding just the sink should be fine if the format works for other tools as well. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an easy way to configure a keybinding that allows for live grep across the working directory?
I am currently stuck with
fzy.execute('ag --nobreak --noheading .', fzy.sinks.edit_file)<cr>"
. This gives me something like thisOf course,
sinks.edit_file
can't open the selection and we need to further parse it. How best to proceed here? Any pointers are appreciated ❤️The text was updated successfully, but these errors were encountered: