Created
April 9, 2021 18:33
-
-
Save jmbr/71d24d27648a928ec770025d6ab32248 to your computer and use it in GitHub Desktop.
Quickly switch to (or start) a Python interpreter buffer in Emacs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun switch-to-python-buffer () | |
"Switch to Python shell buffer quickly." | |
(interactive) | |
(let ((python-buffer (get-buffer "*Python*"))) | |
(if python-buffer | |
(switch-to-buffer python-buffer) | |
(run-python)))) | |
(global-set-key (kbd "C-c z") 'switch-to-python-buffer) | |
(global-set-key (kbd "C-c C-z") 'switch-to-python-buffer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment