summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-dired.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/init-dired.el b/lisp/init-dired.el
index ca444fa..86388b2 100644
--- a/lisp/init-dired.el
+++ b/lisp/init-dired.el
@@ -62,4 +62,15 @@
;; This overrides `dired-find-file', which is also bound to "f".
(define-key dired-mode-map "e" 'km/org-open-dired-marked-files))
+(require-package 'dired-narrow)
+
+(define-prefix-command 'km/dired-narrow-map)
+(define-key km/dired-narrow-map "n" 'dired-narrow)
+(define-key km/dired-narrow-map "f" 'dired-narrow-fuzzy)
+(define-key km/dired-narrow-map "r" 'dired-narrow-regexp)
+
+(defun km/dired-narrow-bindings ()
+ (local-set-key (kbd "C-c m") 'km/dired-narrow-map))
+(add-hook 'dired-mode-hook 'km/dired-narrow-bindings)
+
(provide 'init-dired)