Stuff
authorJoerg Jaspert <joerg.jaspert@dlh.de>
Wed, 21 Jan 2015 15:40:37 +0000 (16:40 +0100)
committerJoerg Jaspert <joerg.jaspert@dlh.de>
Wed, 21 Jan 2015 15:40:37 +0000 (16:40 +0100)
.emacs.d/config/emacs.org

index d3b144d..252401c 100644 (file)
@@ -1422,15 +1422,13 @@ movement keys.
 
 
 ** dired & co
-I like dired and work a lot with it, but it tends to leave lots of
-windows around.
-dired-single to the rescue.
 #+BEGIN_SRC emacs-lisp :tangle yes
 (use-package dired
   :commands (dired dired-other-window dired-other-frame dired-noselect
-                   dired-mode dired-jump)
+                   dired-mode dired-jump find-name-dired)
   :init
   (progn)
+  :bind (("F". find-name-dired))
   :config
   (progn
     (setq dired-auto-revert-buffer (quote dired-directory-changed-p))
@@ -1458,6 +1456,17 @@ dired-single to the rescue.
       :init
       :pre-load (setq diredp-hide-details-initially-flag nil))
 
+    (use-package dired-x)
+    (setq dired-guess-shell-alist-user
+          '(("\\.pdf\\'" "mupdf" "evince")
+            ("\\.\\(?:djvu\\|eps\\)\\'" "evince")
+            ("\\.\\(?:jpg\\|jpeg\\|png\\|gif\\|xpm\\)\\'" "eog")
+            ("\\.\\(?:xcf\\)\\'" "gimp")
+            ("\\.csv\\'" "libreoffice")
+            ("\\.tex\\'" "pdflatex" "latex")
+            ("\\.\\(?:mp4\\|mkv\\|avi\\|flv\\|ogv\\)\\(?:\\.part\\)?\\'" "vlc")
+            ("\\.html?\\'" "conkeror")))
+
     (use-package dired-single
       :ensure dired-single
       :init
@@ -1608,7 +1617,6 @@ ediff - don't start another frame
     (defvar ctl-period-equals-map)
     (define-prefix-command 'ctl-period-equals-map)
     (bind-key "C-. =" 'ctl-period-equals-map)
-
     (bind-key "C-. = c" 'compare-windows)) ; not an ediff command, but it fits
 
   :bind (("C-. = b" . ediff-buffers)
@@ -1620,7 +1628,13 @@ ediff - don't start another frame
          ("C-. = p" . ediff-patch-file)
          ("C-. = P" . ediff-patch-buffer)
          ("C-. = l" . ediff-regions-linewise)
-         ("C-. = w" . ediff-regions-wordwise)))
+         ("C-. = w" . ediff-regions-wordwise))
+  :config (progn
+            (setq ediff-window-setup-function 'ediff-setup-windows-plain)
+            (setq ediff-split-window-function 'split-window-horizontally)
+            (bind-key "j" 'ediff-next-difference ediff-mode-map)
+            (bind-key "k" 'ediff-previous-difference ediff-mode-map))
+)
 #+END_SRC
 ** emms
 EMMS is the Emacs Multimedia System.