Adjust ibuffer
authorJoerg Jaspert <joerg@debian.org>
Sun, 1 Mar 2015 12:59:28 +0000 (13:59 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sun, 1 Mar 2015 12:59:28 +0000 (13:59 +0100)
.emacs.d/config/emacs.org

index 655bded..3df71a0 100644 (file)
@@ -2139,11 +2139,15 @@ _l_ linum-mode:         % 4`linum-mode     _k_ linum relative:    %`linum-format
     (bind-key "s" 'isearch-forward-regexp ibuffer-mode-map)
     (bind-key "." 'ibuffer-invert-sorting ibuffer-mode-map)
 
+    (use-package f
+      :ensure f)
+
     (use-package ibuffer-vc
       :ensure t
       :commands
       (ibuffer-vc-set-filter-groups-by-vc-root
        ibuffer-vc-generate-filter-groups-by-vc-root))
+
     (use-package ibuffer-tramp
       :ensure t
       :commands (ibuffer-tramp-generate-filter-groups-by-tramp-connection
@@ -2272,6 +2276,22 @@ _l_ linum-mode:         % 4`linum-mode     _k_ linum relative:    %`linum-format
 
     (bind-key "h" 'toggle-ibuffer-filter-groups ibuffer-mode-map)
 
+    (defun ibuffer-back-to-top ()
+      (interactive)
+      (beginning-of-buffer)
+      (next-line 3))
+
+    (defun ibuffer-jump-to-bottom ()
+      (interactive)
+      (end-of-buffer)
+      (beginning-of-line)
+      (next-line -2))
+
+    (define-key ibuffer-mode-map
+      (vector 'remap 'end-of-buffer) 'ibuffer-jump-to-bottom)
+    (define-key ibuffer-mode-map
+      (vector 'remap 'beginning-of-buffer) 'ibuffer-back-to-top)
+
     (setq ibuffer-default-sorting-mode 'recency
           ibuffer-eliding-string "…"
           ibuffer-compile-formats t
@@ -2279,6 +2299,7 @@ _l_ linum-mode:         % 4`linum-mode     _k_ linum relative:    %`linum-format
           ibuffer-show-empty-filter-groups nil
           ibuffer-default-directory "~/"
           )
+
     (setq ibuffer-formats '((mark vc-status-mini
                                   " "
                                   (git-status 8 8 :left)