Endless Parentheses

Concise ramblings on Emacs productivity.

Hungry Delete Mode

hungry-delete-mode is what I like to call a “free feature” —it asks nothing of you. In contrast, most other worthwhile features charge you a price. The cheapest novelties charge some mental effort on your part to fit into your workflow, the moderate ones ask for some space on your ever-diminishing set of free keys, and a few narcisistic gems demand that you adopt a completely new state of mind (paredit, I'm looking at you).

hungry-delete-mode doesn't steal a key and takes absolutely no effort to master. It isn't big and flashy, but it is one of the features I miss the most when I'm not in Emacs.

Plain and simple, it makes backspace and C-d erase all consecutive white space in a given direction (instead of just one). Use it everywhere.

(unless (fboundp 'hungry-delete-mode)
  (package-install 'hungry-delete))

(require 'hungry-delete)
(global-hungry-delete-mode)

Update

Comments have been made with regards to this breaking delete-selection-mode. Well, while the weak complained, Michael Fogleman took it upon himself to fix it and make the world a better place.

The update is already on Melpa.

Tags: init.el, emacs

Say thanks on Gratipay
comments powered by Disqus