Prefer backward-kill-word over Backspace
An alternative to the analogous item in Steve Yegge's list of tips effective-emacs, taking advantage of region-bindings-mode. Rather simple, but I didn't see this particular setting anywhere else.
(require 'region-bindings-mode)
(region-bindings-mode-enable)
(global-set-key (kbd "C-w") 'backward-kill-word)
(define-key region-bindings-mode-map (kbd "C-w") 'kill-region)
By using the region-binding-mode package we can retain the familiar C-w keybinding for cutting a region of text when the mark is active, while still having it bound globally to the 'backward-kill-word function, when it is not.
Written by ermanno
Related protips
1 Response
Waiting more Emacs tips!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Emacs
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#