From 7d877d422a0878c7669720fc332034580cb62722 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 17 Nov 2013 11:11:58 +0100 Subject: Add easy switching to most recent buffer --- .emacs.d/init.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.emacs.d/init.org') diff --git a/.emacs.d/init.org b/.emacs.d/init.org index c62a1d2..d8536e0 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -422,3 +422,19 @@ #+BEGIN_SRC emacs-lisp (add-hook 'js2-mode-hook #'tern-mode) #+END_SRC + +* Switch to most recent buffer + + Like GNU Screen has the =C-a C-a= (at least with a =C-a= prefix) + combination and stumpwm has =C-z C-z= (at least with a =C-z= prefix) I + really need to be able to switch between the two most recently + viewed buffers easily. + + #+BEGIN_SRC emacs-lisp + (defun init-switch-to-other-buffer () + "Switch to the most recently viewed buffer." + (interactive) + (switch-to-buffer (other-buffer))) + + (global-set-key (kbd "C-. C-.") #'init-switch-to-other-buffer) + #+END_SRC -- cgit v1.2.3-54-g00ecf