diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2013-12-02 06:01:07 (GMT) |
|---|---|---|
| committer | Ravikiran Rajagopal <aine.marina@gmail.com> | 2013-12-02 06:01:07 (GMT) |
| commit | 65464658d5db34f4af9faead1de657c0fd905ae1 (patch) | |
| tree | be0b9e8efb76b116a87245523a0721c4c694ef48 /ravi-init-ido.el | |
| parent | be62ef07ce12448d87f65e17ba24ecdc1c9c5de6 (diff) | |
| download | dotemacs-65464658d5db34f4af9faead1de657c0fd905ae1.zip dotemacs-65464658d5db34f4af9faead1de657c0fd905ae1.tar.gz dotemacs-65464658d5db34f4af9faead1de657c0fd905ae1.tar.bz2 | |
Easy switching in ibuffer to previous buffer
Diffstat (limited to 'ravi-init-ido.el')
| -rw-r--r-- | ravi-init-ido.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ravi-init-ido.el b/ravi-init-ido.el index 8173353..307a35a 100644 --- a/ravi-init-ido.el +++ b/ravi-init-ido.el @@ -27,7 +27,17 @@ ;; Almost all of the code below is stolen from jwiegley's .emacs.d. (use-package ibuffer - :bind ("C-x C-b" . ibuffer)) + :bind ("C-x C-b" . ibuffer) + :config + (progn + ;; 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))) + ) + ) ;;;_ , ido |
