Skip to main content
1 of 3

I want when "C-w" is pressed, execute delete-backward-char when no region is selected and kill-region when the region is selected

Similarly, I want to delete word backward when C-u C-w is pressed.

I tried to bind C-w to delete-backward-char, but kill-region stopped working. Please help as I find it irritating to stretch my fingers to tap DEL key and I commit a lot of mistakes while typing. Thank You