all repos — archive/dotfiles @ 20798ab71a19b73f7e1d178bc2a3a5059e3be7f3

Superseded by nixfiles

Emacs: Setup dired-k
Alan Pearce alan@alanpearce.co.uk
Thu, 25 Dec 2014 11:51:04 +0000
commit

20798ab71a19b73f7e1d178bc2a3a5059e3be7f3

parent

ecb5a69b89c6357fecee4401f8a3ae9d9e07b51d

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -296,6 +296,13 @@ (when (and (eq system-type 'darwin) (executable-find "gls"))               (setq insert-directory-program (executable-find "gls")))
             (put 'dired-find-alternate-file 'disabled nil)))
 
+(req-package dired-k
+  :init (progn
+          (defun ap/dired-k-if-vc ()
+            (when (projectile-project-root)
+              (dired-k)))
+          (add-hook 'dired-initial-position-hook #'ap/dired-k-if-vc)))
+
 (req-package dired-x
   :require dired)