Created
August 22, 2017 06:18
-
-
Save daviderestivo/932ffe0b10a12ab04257c62fd7051cd7 to your computer and use it in GitHub Desktop.
Replace helm grep with ag (The Silver Searcher)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Replace the default helm grep command with ag. | |
;; Requires "The Silver Searcher" (ag) to be installed. | |
;; On macOS use: 'brew install the_silver_searcher' | |
(when (executable-find "ag") | |
;; For helm to recognize correctly the matches we need to enable | |
;; line numbers and columns in its output, something the | |
;; --vimgrep option does. | |
(setq helm-grep-default-command "ag --vimgrep --nogroup --nocolor -z %p %f" | |
helm-grep-default-recurse-command "ag --vimgrep --nogroup --nocolor -z %p %f")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment