Change command "send code to interpreter" (Cc |) in python mode

I use the "Cc Cr" command to send code to the interpreter in R using Emacs. How can I set python mode to use "Cc Cr" and not "Cc |" for evaulate code?

Thank!

+3


source to share


1 answer


It's already tied to C-c C-r

in the built-in python.el, but here's the command that binds the key. If you are using python-mode.el you will have to change the library name, command and possibly map.



(eval-after-load "python"
  '(progn
     (define-key python-mode-map (kbd "C-c C-r") 'python-shell-send-region)))

      

+1


source







All Articles