(setq-default grep-highlight-matches t
              grep-scroll-output t)

(when *is-a-mac*
  (setq-default locate-command "mdfind"))

(when (executable-find "ag")
  (require-package 'ag)
  (require-package 'wgrep-ag)
  (setq-default ag-highlight-search t)
  (global-set-key (kbd "M-?") 'ag-project))


(provide 'init-grep)

(setq-default grep-highlight-matches t
              grep-scroll-output t)

(when *is-a-mac*
  (setq-default locate-command "mdfind"))

(when (and (executable-find "ag")
           (maybe-require-package 'ag))
  (require-package 'wgrep-ag)
  (setq-default ag-highlight-search t)
  (global-set-key (kbd "M-?") 'ag-project))

(when (and (executable-find "rg")
           (maybe-require-package 'rg))
  (global-set-key (kbd "M-?") 'rg-project))


(provide 'init-grep)

Install rg.el if "rg" is available
Install rg.el if "rg" is available

baohaojun/emacs.d,sgarciac/emacs.d,qianwan/emacs.d,gsmlg/emacs.d,emuio/emacs.d,cjqw/emacs.d,roxolan/emacs.d,wegatron/emacs.d,benkha/emacs.d,kongfy/emacs.d,purcell/emacs.d,dcorking/emacs.d,blueseason/emacs.d,mmqmzk/emacs.d,svenyurgensson/emacs.d,braveoyster/emacs.d,kindoblue/emacs.d,lust4life/emacs.d,arthurl/emacs.d,krzysz00/emacs.d,blueabysm/emacs.d,me020523/emacs.d