Created
April 8, 2013 17:30
-
-
Save PuercoPop/5338664 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Thanks to tali713 | |
(defun backward-kill-word-or-kill-region () | |
"When no region is active call backward-kill-word, otherwise kill-region. To | |
make it behave like the shell " | |
(interactive) | |
(call-interactively (if (region-active-p) | |
'kill-region | |
'backward-kill-word))) | |
(global-set-key (kbd "C-w") 'backward-kill-word-or-kill-region) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment