rking / ag.vim

Vim plugin for the_silver_searcher, 'ag', a replacement for the Perl module / CLI script 'ack'
1.74k stars 131 forks source link

How do I search with regular expressions? #71

Closed wejrowski closed 9 years ago

wejrowski commented 9 years ago

Is there a way to use regex with the ag command? I've been searching and cannot find an answer!

losingkeys commented 9 years ago

By default the :Ag commands this plugin provides will pass your search onto ag, which will treat it like a regular expression, unless you change g:agprg to have the --literal option. Have a look at the docs here: https://github.com/rking/ag.vim/blob/master/doc/ag.txt if you have more questions about how this plugin interacts with ag, or the ag documentation here: https://github.com/ggreer/the_silver_searcher/blob/master/doc/ag.1.md if you have questions about working with ag itself. This plugin is a fairly thin wrapper over ag that adds vim integration to make working with searches from within vim a bit nicer.