12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pt(The Platinum Searcher) で検索し peco で絞り込んで emacs で該当行を開く

Last updated at Posted at 2014-07-18

ag(The Silver Searcher)で検索しpecoで更に絞り込みvimで該当行を開く
を見て、emacsで同じことができたらいいなーって思って書きました。
ほとんど同じです。ぶっちゃけパクりです。
僕の趣味でag(The Silver Searcher)じゃなくてpt(The Platinum Searcher)を使ってますが、書き換えれば動くと思います。

環境

zsh
pt(The Platinum Searcher)
peco

設定

zshrc
function ptemacs () {
  emacs $(pt "$@" | peco --query "$LBUFFER" | awk -F : '{print "+" $2 " " $1}')
}

使い方

ptemacs 検索文字列

で peco の画面で選択して決定

既知の問題

ファイル名にスペースが入ってると使えません。

12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?