Last Updated: June 24, 2016
·
1.497K
· ryrych

Exact string search with ag search

Suppose that you forgot how to pass a param to t helper:

{% raw %}{{input type='text' value=selectedUserName id='inputUserName' class='form-control' placeholder=(t 'user.name.placeholder')}}{% endraw %}

The easiest way is to search for similar usage in your project:

ag "\(t \'" -G .hbs$

Escaping is boring, but ag allows you to leave \\ with wit -Q option:

ag -Q '(t ' -G .hbs

ag is faster then ack and grep. If you want to use ag in vim, use this repo:

Plug 'rking/ag.vim'

Have fun!