summaryrefslogtreecommitdiffstats
path: root/.emacs.d/init.org
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init.org')
-rw-r--r--.emacs.d/init.org16
1 files changed, 16 insertions, 0 deletions
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