Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to delete region with [delete] key in emacs

I am using Emacs 23.3 on Mac OS X Lion. How can I delete the selected text region with simple key typing—something like delete or C-d? This works on windows without setting anything specific. How can I implement that in Mac OS X Lion?

like image 925
luozengbin Avatar asked Oct 28 '11 01:10

luozengbin


2 Answers

You need to enable delete-selection-mode and then it will work ;-)

like image 108
Alex Ott Avatar answered Oct 05 '22 08:10

Alex Ott


Try M-xcua-mode. This will change a lot of things about the way Emacs behaves to fit the behavior of other GUI applications. For more information, see M-S-:(info "(emacs) CUA Bindings").

You can turn it on persistently with M-xcustomize-optionRETcua-mode.

like image 45
Michael Hoffman Avatar answered Oct 05 '22 08:10

Michael Hoffman