Skip to content

Instantly share code, notes, and snippets.

Created Jan 10, 2013
What would you like to do?
Jumping to the most recent buffer.
(defalias 'last-buffer 'mode-line-other-buffer)
(global-set-key (kbd "M-O") 'last-buffer)
(defun my/split-window()
"Split the window to see the most recent buffer in the other window.
Call a second time to restore the original window configuration."
(if (eq last-command 'my/split-window)
(jump-to-register :my/split-window)
(setq this-command 'my/unsplit-window))
(window-configuration-to-register :my/split-window)
(switch-to-buffer-other-window (other-buffer))))
(global-set-key (kbd "M-9") 'my/split-window)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment