Hacker News new | ask | show | jobs
by daemianmack 5763 days ago
Funny, about an hour ago I finally broke down and remapped Ctrl+w to backward-kill-word[1] after re-reading Yegge's Effective Emacs, and you've just reminded me to push the commit to my fork of emacs-starter-kit, which is a great way to get a core set of functionality. Works best if you're tyrannical about keeping it up to date, which I mostly am.

http://github.com/daemianmack/emacs-starter-kit/

Favorite two most recent additions: pyflakes/pylint for Python, and rainbow-mode for CSS.

[1] Having backward-kill-word a two-finger-stroke, instead of the two-handed alt+Backspace, is great! On the other hand, it turns out I kill-region a lot more than I thought I did, so that's a little weird.

1 comments

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.
Excellent idea; thanks!