0

How can I replace py-hungry-delete-backwards for the traditional backward-kill-word in python-mode.el? I tried to define the C-DEL key in the python-mode hook but it just get ignored.

This is, I want to use the backward-kill-word command with C-DEL in a python environment.

Thanks!

1
  • Please show the actual code you've tried.
    – Stefan
    Feb 10, 2017 at 18:16

1 Answer 1

1

Well, I found the solution in a bugreport:

(add-hook 'python-mode-hook
          (lambda ()
            (define-key python-mode-map (kbd "<C-backspace>") 'backward-kill-word)))

For some reason my implementation of a similar hook was not working.

1
  • backward-kill-word should exist as M-backspace too. Feb 11, 2017 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.