環境
設定
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
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
function agvim () {
vim $(ag $@ | peco --query "$LBUFFER" | awk -F : '{print "-c " $2 " " $1}')
}
agvim 検索文字
で検索し、pecoの画面で選択しenter
pt(The Platinum Searcher)やgit grepを使いたい場合はag $@の部分をpt $@やgit grep -n $@とすればOK
Register as a new user and use Qiita more conveniently
Go to list of users who liked