(Optionally) set @/ (search register)
It would be useful if the plugin would set the search register (@/) automatically after searching.
What do you think? There should probably be an option for this (off by default)?
My main concern here would be that pcre and vim's regex are very different, so setting the search register would only be helpful if the search was a very basic one. What is the use case you are attempting to solve?
pcre and vim's regex are very different, so setting the search register would only be helpful if the search was a very basic one
Yes, that's a limitation I'm aware of. Although there's some basic conversation already.
My use case is that I often want to search for the string :Ag foo independently from the quickfix list, e.g. in another file, which is not included in the search etc.
Additionally I'd like use just n/N sometimes instead of the quickfix list, although I have vim-unimpaired for this already.
I was thinking about this some more and I'm reluctant to add a feature that will only work part of the time. To do this fully I think it would have to convert the pcre pattern to a vim pattern, and doing so would probably result in an endless stream of issues.
Agreed.
But exporting the current conversions method would be helpful when creating custom maps for this.
Something like ag#convert_pattern_to_vim and ag#get_current_pattern etc.