3

Looked through the options through :help Ag but didn't see anything. The closest I got was lhandler but that's only controlling the new window that opens.

5

It was right there, if you append a ! to the command, it'll not open the first result. I'll map :Ag to :Ag!.

:Ag[!] [options] {pattern} [{directory}]                               *:Ag*

    Search recursively in {directory} (which defaults to the current
    directory) for the {pattern}.  Behaves just like the |:grep| command, but
    will open the |Quickfix| window for you. If [!] is not given the first
    error is jumped to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.