summaryrefslogtreecommitdiffstats
path: root/.emacs.d/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-11-17 11:11:58 +0100
committerGravatar Tom Willemse2013-11-17 11:11:58 +0100
commit7d877d422a0878c7669720fc332034580cb62722 (patch)
tree84de890d0291300797f06145a85ec6456bd40613 /.emacs.d/init.org
parent911692e53677171579d04f2193fc05e09caf6737 (diff)
downloademacs-7d877d422a0878c7669720fc332034580cb62722.tar.gz
emacs-7d877d422a0878c7669720fc332034580cb62722.zip
Add easy switching to most recent buffer
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