From 0e7dceb7325deb42faef3488d9663fd53388d17d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 29 Nov 2014 22:42:03 -0500 Subject: Make map for grep and find variants --- lisp/init-buffile.el | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lisp/init-buffile.el b/lisp/init-buffile.el index 28540f9..c5e8ee1 100644 --- a/lisp/init-buffile.el +++ b/lisp/init-buffile.el @@ -81,15 +81,32 @@ entering `ch' is equivalent to `*.[ch]'.") (goto-line 5) (narrow-to-region (point) (point-max))))) -(defadvice grep (after hide-grep-header activate) (hide-grep-header)) -(defadvice rgrep (after hide-grep-header activate) (hide-grep-header)) -(defadvice lgrep (after hide-grep-hxoeader activate) (hide-grep-header)) -(defadvice grep-find (after hide-grep-header activate) (hide-grep-header)) +(after 'grep + (defadvice grep (after hide-grep-header activate) (hide-grep-header)) + (defadvice rgrep (after hide-grep-header activate) (hide-grep-header)) + (defadvice lgrep (after hide-grep-hxoeader activate) (hide-grep-header)) + (defadvice grep-find (after hide-grep-header activate) (hide-grep-header))) (after 'vc-git (defadvice vc-git-grep (after hide-grep-header activate) (hide-grep-header))) (key-chord-define-global ",z" 'rgrep) +(define-prefix-command 'km/file-search-map) +(define-key 'km/file-map "s" 'km/file-search-map) + +(define-key 'km/file-search-map "g" 'lgrep) +(define-key 'km/file-search-map "G" 'grep) +(define-key 'km/file-search-map "f" 'grep-find) + +(define-key 'km/file-search-map "r" 'rgrep) + +(define-key 'km/file-search-map "v" 'vc-git-grep) +(define-key 'km/file-search-map "z" 'zrgrep) + +(define-key 'km/file-search-map "n" 'find-name-dired) +(define-key 'km/file-search-map "d" 'find-grep-dired) +(define-key 'km/file-search-map "D" 'find-dired) + ;;; Ibuffer ;; Replace buffer-menu with ibuffer. -- cgit v1.2.3