Next: How do I control Emacs’s case-sensitivity when searching/replacing?, Previous: How do I make Emacs use a certain major mode for certain files?, Up: Common requests [Contents][Index]
Use delete-selection-mode
, which you can start automatically by
placing the following Lisp form in your init file (see How do I set up an init file properly?):
(delete-selection-mode 1)
According to the documentation string for delete-selection-mode
(which you can read using M-x describe-function RET
delete-selection-mode RET):
When Delete Selection mode is enabled, typed text replaces the selection if the selection is active. Otherwise, typed text is just inserted at point regardless of any selection.
This mode also allows you to delete (not kill) the highlighted region by pressing DEL.