ag.vim icon indicating copy to clipboard operation
ag.vim copied to clipboard

Create option for setting default "open style" with Ag or Ag!

Open typeoneerror opened this issue 9 years ago • 4 comments

:Ag! is handy if you don't want to open the first result in the search. It'd be great if we could set an option in the settings for ag.vim to make Ag perform the search in this manner. With this option, perhaps Ag! would just be the opposite of whatever you've defined your default to be.

typeoneerror avatar Oct 28 '15 22:10 typeoneerror

@typeoneerror Wow, I was looking all over the place for this option. Why isn't this documented? Thank you!

danihodovic avatar Nov 16 '15 17:11 danihodovic

A setting for this behavior would be really great instead of having to remember to use the non-default command each time.

mattnworb avatar Feb 19 '16 15:02 mattnworb

+1 And that behaviour should also be replciated to AgFile, AgBuffer, etc

lfilho avatar Mar 30 '16 11:03 lfilho

let g:ag_default_open_style = 'noreplace' did not work for me.

However, the below snippets did make Ag! the default behaviour.

cnoreabbrev Ag Ag!
nnoremap <Leader>a :Ag!<Space>

superDross avatar Oct 13 '18 19:10 superDross