dired: M-> and M-< now go to the first/last file
authorJoerg Jaspert <joerg@debian.org>
Sat, 14 Jun 2014 20:59:30 +0000 (22:59 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sat, 14 Jun 2014 20:59:30 +0000 (22:59 +0200)
.emacs.d/config/emacs.org

index 7e866a4..42f9146 100644 (file)
@@ -1430,7 +1430,23 @@ dired-single to the rescue.
                                   nil nil "/")))
       (dired first-dir)
       (dired-other-window second-dir))
                                   nil nil "/")))
       (dired first-dir)
       (dired-other-window second-dir))
-    (bind-key "C-c J" 'dired-double-jump)))
+    (bind-key "C-c J" 'dired-double-jump)
+
+    (defun dired-back-to-top ()
+      (interactive)
+      (beginning-of-buffer)
+      (dired-next-line 4))
+
+    (define-key dired-mode-map
+      (vector 'remap 'beginning-of-buffer) 'dired-back-to-top)
+
+    (defun dired-jump-to-bottom ()
+      (interactive)
+      (end-of-buffer)
+      (dired-next-line -1))
+
+    (define-key dired-mode-map
+      (vector 'remap 'end-of-buffer) 'dired-jump-to-bottom)))
 
 #+END_SRC
 ** discover-my-major
 
 #+END_SRC
 ** discover-my-major