diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2014-03-03 01:20:45 (GMT) |
|---|---|---|
| committer | Ravikiran Rajagopal <aine.marina@gmail.com> | 2014-03-03 01:20:45 (GMT) |
| commit | 491bd878eee20a6a3651867240dc6a1b46a5b8b5 (patch) | |
| tree | df9dd534388ba5cab1343d23af4c24105f334608 /ravi-init-ido.el | |
| parent | aa8a8272df638c53e254ab32bb1c25f6b9821eb8 (diff) | |
| download | dotemacs-491bd878eee20a6a3651867240dc6a1b46a5b8b5.zip dotemacs-491bd878eee20a6a3651867240dc6a1b46a5b8b5.tar.gz dotemacs-491bd878eee20a6a3651867240dc6a1b46a5b8b5.tar.bz2 | |
Sort by vc in ibuffer mode
Diffstat (limited to 'ravi-init-ido.el')
| -rw-r--r-- | ravi-init-ido.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ravi-init-ido.el b/ravi-init-ido.el index 1312379..9d20034 100644 --- a/ravi-init-ido.el +++ b/ravi-init-ido.el @@ -30,12 +30,24 @@ :bind ("C-x C-b" . ibuffer) :config (progn + + (use-package ibuffer-vc + :ensure t + :commands ibuffer-vc-set-filter-groups-by-vc-root + ) + ;; Switching to ibuffer puts the cursor on the most recent past buffer (defadvice ibuffer (around ibuffer-point-to-most-recent-but-one activate) () "Open ibuffer with cursor pointed to most recent buffer name" (let ((recent-buffer-name (buffer-name (other-buffer (current-buffer) t)))) ad-do-it (ibuffer-jump-to-buffer recent-buffer-name))) + + (defun ravi/ibuffer-vc-sort-hook () + (ibuffer-vc-set-filter-groups-by-vc-root) + (unless (eq ibuffer-sorting-mode 'alphabetic) + (ibuffer-do-sort-by-alphabetic))) + (add-hook 'ibuffer-hook 'ravi/ibuffer-vc-sort-hook) ) ) |
