wehrad · 2022-03-05 08:15
Hi everyone,
I'm looking for a way to set a keybinding to switch the current active buffer to a specific one. In my case, it would be something like "C-c p" to switch to my Python run (\*Python\* buffer). Unfortunately I couldn't find an example so far... Any help would be much appreciated! Thank you a lot in advance!
[deleted] · 2022-03-05 08:22
[deleted]
KonpakuYoumu · 2022-03-05 09:04
(defun to-python-repl ()
(interactive)
(when-let ((buf (get-buffer "*Python*")))
(pop-to-buffer buf)))
(global-set-key (kbd "C-h C-c") 'to-python-repl)
astoff1 · 2022-03-05 09:57
There is already `python-shell-switch-to-shell`, bound to `C-c C-z`.
wehrad · 2022-03-07 17:31
Thank you a lot!
wehrad · 2022-03-07 17:31
It was already there and I didn't see it, thank you a lot!