Skip to content

Instantly share code, notes, and snippets.

@tjweir
Created August 18, 2018 20:21
Show Gist options
  • Save tjweir/7e4e40c39343ad8f5055d1da667160c6 to your computer and use it in GitHub Desktop.
Save tjweir/7e4e40c39343ad8f5055d1da667160c6 to your computer and use it in GitHub Desktop.
"http://emacsredux.com/blog/2013/04/28/switch-to-previous-buffer/"
(defun switch-to-previous-buffer ()
"Switch to previously open buffer.
Repeated invocations toggle between the two most recently open buffers."
(interactive)
(switch-to-buffer (other-buffer (current-buffer) 1)))
(global-set-key (kbd "C-c b") 'switch-to-previous-buffer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment