Skip to content

Instantly share code, notes, and snippets.

@clvrobj
Last active December 22, 2015 21:19
Show Gist options
  • Save clvrobj/6532782 to your computer and use it in GitHub Desktop.
Save clvrobj/6532782 to your computer and use it in GitHub Desktop.
(defun switch-same-buffer-other-window()
"Open same buffer and switch to the other window."
(interactive)
(let ((cur-buf (current-buffer)))
(other-window 1)
(switch-to-buffer cur-buf)))
(global-set-key "\C-x\C-o" 'switch-same-buffer-other-window)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment