Skip to content
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

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

Open
typeoneerror opened this issue Oct 28, 2015 · 4 comments
Open

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

typeoneerror opened this issue Oct 28, 2015 · 4 comments

Comments

@typeoneerror
Copy link

: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.

@danihodovic
Copy link

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

@mattnworb
Copy link

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

@lfilho
Copy link

lfilho commented Mar 30, 2016

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

kjell added a commit to kjell/ag.vim that referenced this issue Jun 4, 2016
`let g:ag_default_open_style = 'noreplace'` makes `Ag!`s behavior the
default.

Fixes rking#119
kjell added a commit to kjell/ag.vim that referenced this issue Jun 4, 2016
`let g:ag_default_open_style = 'noreplace'` makes `Ag!`s behavior the
default.

Fixes rking#119
benoittgt added a commit to benoittgt/dotfiles-1 that referenced this issue Jul 25, 2016
By default Ag.vim open the first result. To avoid you can add a bang.
Their is a PR to make it default but it's not merge : rking/ag.vim#119
@superDross
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants