aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/oni-grep.el
blob: 8f92232764e23b293e0096dcdc8479dda88b5f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;; Start of oni-grep

(use-package grep
  :config
  (require 'find-dired)

  (add-to-list 'grep-files-aliases '("msbuild" . "*.targets *.proj"))

  (when (eq system-type 'windows-nt)
    (setq find-program (shell-quote-argument "c:/cygwin64/bin/find.exe"))
    (setq grep-program (shell-quote-argument "c:/cygwin64/bin/grep.exe"))
    (setq grep-use-null-device nil)

    (let ((exe (shell-quote-argument "c:/cygwin64/bin/ls.exe")))
      (setq find-ls-option
            (cons (concat "-exec " exe " -ld {} \";\"") "-ld"))))

  (setf (map-elt display-buffer-alist (rx bos "*grep*" eos))
        '(display-buffer-in-side-window
          (side . bottom)
          (slot . 0)
          (window-height . 0.33)))

  (add-to-list 'grep-find-ignored-directories ".cask")

  (add-hook 'grep-mode-hook 'hl-line-mode))


;; End of oni-grep