reddit / emacs

Map C-Backspace to backward-kill-word

attitude12136 · 2022-10-07 22:01
Hello, I am an emacs beginner and I am running into this annoying issue where pressing Control-Basckscpace brings up the help menu, which is the same as pressing Control-h. I want to remap C-Backspace to the function backward-kill word but keep C-h for help. Currently, I have M-Backspace mapped to backward-kill-word be default, but I do not want to get used to that one because I use C-Backspace outside of Emacs. What is the best solution here? I have looked online and did not find solutions that work exactly like I want. Some remapped C-h which is not what I want to do. I am using wsl 2 ubuntu if that matters at all.
adx · 2022-10-07 22:49
Are you using emacs in a terminal?
attitude12136 · 2022-10-08 01:02
Yes
thetemp_ · 2022-10-08 01:27
If you don't have a special reason to use the terminal, use the GUI instead. But to solve this problem, [it sounds like you need to put `(normal-erase-is-backspace-mode 1)` in your init file](https://www.gnu.org/software/emacs/manual/html_node/emacs/DEL-Does-Not-Delete.html).