From ccac1d6c334365852fe0fd6a85d4d8d55336a794 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 29 Oct 2016 14:15:06 -0700 Subject: [emacs] More configuration for dired. Enable the package `dired-x', and make sure we use `gls` instead of ls only if the binary is available. --- emacs.d/init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'emacs.d/init.el') diff --git a/emacs.d/init.el b/emacs.d/init.el index 3b1be0c..35f2cda 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -44,7 +44,18 @@ (use-package dired :bind ("C-x C-d" . dired) :config - (setq dired-listing-switches "-laGhv")) + (let ((gls "/usr/local/bin/gls")) + (if (file-exists-p gls) + (setq insert-directory-program gls + dired-listing-switches "-aBhl --group-directories-first"))) + (use-package dired-x + :init + (add-hook 'dired-load-hook (lambda () (load "dired-x"))) + :config + (add-hook 'dired-mode-hook #'dired-omit-mode) + (setq dired-omit-verbose nil) + (setq dired-omit-files + (concat dired-omit-files "\\|^.DS_Store$\\|^.projectile$\\|^.git$")))) (use-package lisp-mode :config -- cgit 1.4.1