LoginSignup
2
2

More than 5 years have passed since last update.

grep検索を使いやすくする: igrep.el

Posted at

EmacsからM-x grepだとコマンドラインを打つだけなので、パターンをクオートしたり大変です。igrepをいれて対話的なインターフェースにします。

インストールは、こちらの設定がしてあれば、M-x package-list-packagesの一覧からigrepをインストールします。

設定ファイルに下記を追加します。

.emacs.d/init.el
;;; igrep.el
(require 'igrep)
; lgrepの出力をUTF-8にする
(igrep-define lgrep (igrep-use-zgrep nil)(igre-regex-option "-n -Ou8"))
(igrep-find-define lgrep (igrep-use-zgrep nil)(igrep-regex-option "-n -Ou8"))

M-x igrepをします。そうすると、正規表現と検索対象のファイルの入力がうながされるので、それぞれ入力します。

2
2
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
2
2