Hacker News new | ask | show | jobs
by pttr 5764 days ago
I too made the switch after reading Yegge's good stuff, but missed kill-region so badly I had to come up with this:

    (defun backward-kill-word-or-kill-region (&optional arg)
      (interactive "p")
      (if (region-active-p)
    	  (kill-region (region-beginning) (region-end))
    	(backward-kill-word arg)))

    (global-set-key (kbd "C-w") 'backward-kill-word-or-kill-region)
This gets me kill-region for an active (transient-mark-mode) region but backward-kill-word otherwise.
1 comments

Excellent idea; thanks!