-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
How can I get :Ag results to populate the quickfix list #586
Comments
@trevordmiller I literally just figured this out today! Was gonna write a blogpost about it, but haven't got to it yet. You have to customize a bit in your vimrc, but it's pretty simple (see here). First, you might have to map Second, you'll need to map and add the Once these are done, you should be able to Hope it helps! |
@jesseleite Thank you! That would be nice if no extra config was required though - not sure why ALT-A was chosen if it doesn't work on macs... |
See #54 |
Especially this comment: #54 (comment) Also, https://stackoverflow.com/questions/18923765/bash-keyboard-shortcuts-in-iterm-like-altd-and-altf |
@junegunn Ok so I am using iTerm2 so I enabled |
Ok I finally figured it out - it's:
Or you can select multiple items:
It would be great if this could be added to the documentation :) Thanks! |
Oh wait you an populate quickfix without any custom config? |
@jesseleite Yep. Select items using |
Wow I feel stupid... how did I miss Also regarding So my whole custom config is unnecessary, unless I want Anyway, thanks for sharing! |
@trevordmiller thanks for the tip! Is is possible to make a script which will do this automatically? E.g. make a search function which will do:
I want to be able to type: :Ag some-string and have it populate quickfix list automatically |
@eliasdaler Wouldn't that defeat the purpose of FZF? If you are not filtering manually afterwards? vim-grepper can do that. Though the only thing missing from FZF grepping (compared to vim-grepper for me) now is a way to get operators for grepping for current word or visual selection.. maybe that already exists as well? |
You should be able to use Vim's built-in mapping ( As for pasting visual selection, the best way I've found so far is to You should be able to set up either of these into a custom mapping to run whatever FZF command for text under cursor or text in yank (or any other) register. |
@traviswaelbro For the yank register I use Here is the mapping I use to search for the yank register:
|
Category
OS
Vim
Make sure that you have the latest version of fzf and fzf.vim
Check if your problem is reproducible with a minimal configuration
I've read in a few places that you can use
:Ag
and thenCTRL-A
to populate the quickfix list with the results (like how the native:grep
does). But I can't get it to work. I've tried with::Ag
=> enter > fuzzy search => CTRL-A:Ag {search}
=> enter => CTRL-A:Ag {search}
=> enter => fuzzy search => CTRL-AHow can I get
:Ag
results to populate the quickfix list?The text was updated successfully, but these errors were encountered: