129
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Organization

ag(The Silver Searcher)で検索しpecoで更に絞り込みvimで該当行を開く

agvim.mp4.gif

環境

設定

zshrc
function agvim () {
  vim $(ag $@ | peco --query "$LBUFFER" | awk -F : '{print "-c " $2 " " $1}')
}

使い方

agvim 検索文字

で検索し、pecoの画面で選択しenter

agのほかに

pt(The Platinum Searcher)git grepを使いたい場合はag $@の部分をpt $@git grep -n $@とすればOK

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
129
Help us understand the problem. What are the problem?