4

How can I tell emacs to work in the same way as Windows or Mac where if I select a region, and start typing, the region will be deleted prior to the new text to be inserted?

woodings
  • 7,503
  • 5
  • 34
  • 52

1 Answers1

16

I don't think it does it out of the box, it looks like you have to turn on delete-selection-mode as per this article on EmacsWiki.

So, basically put the following line into your .emacs:

(delete-selection-mode 1)
Timo Geusch
  • 24,095
  • 5
  • 52
  • 70
  • And consider sending an enhancement request to Emacs to ask that `delete-selection-mode` be turned on by default: `M-x report-emacs-bug` (it's also for enhancement requests). It took a couple of decades to finally get selection highlighting (so-called `transient-mark-mode`) to be turned on by default --- progress is slow and regular-user input can help. – Drew Aug 10 '13 at 21:22
  • As an alternative to editing your **.emacs** file directly, you can change the setting of interest interactively using the [Customize](http://www.emacswiki.org/emacs/CustomizingAndSaving) user interface: `M-x customize-variable [RET] delete-selection-mode [RET]`. – DavidRR Dec 10 '13 at 19:40