Mac OS X Terminal: Map option+delete to "backward delete word"

ibz picture ibz · Nov 29, 2008 · Viewed 66.4k times · Source

Tried to map it from Preferences -> Settings -> Keyboard, but the "key" combo box has only "forward delete" but no "delete". My keyboard on the other hand has only "delete" and no "forward delete"!

Is there some other way to do it except from the preferences?

Answer

Andru Luvisi picture Andru Luvisi · Nov 29, 2008

Enable option key as meta key

  1. Go to Terminal > Preferences > Profiles > Keyboard
  2. Check Use option key as meta key.

Image

On macOS High Sierra 10.13.6, captured on October 23, 2018.

Illustration of the window for toggling option key as meta key

Notes

Many applications (including bash and tcsh) treat Meta-Delete as "backward delete word."