- when I make a selection, I can see the select part with some different color;
- when I have selected some text, and I type something, it replaces the selection.
I prefer the behaviours (1) and (2) over the defaults. Fortunately, it's really easy to enable them by putting the following in your .emacs (see also the general discussion of modes):
(transient-mark-mode t) ; make the current 'selection' visible (delete-selection-mode t) ; delete the selection area with a keypressNormally, you can start a selection ('mark') with C-SPC (Ctrl-Space); the selection ('region') will be the area between this position and the cursor. However, transient-mark-mode also allows you to use the 'Windows-style' shift + arrow-key selections - at least in recent versions. I think these should be made the defaults, but defaults change only slowly in emacs-land.
Cutting text ('kill') can be done with C-w, and copying with M-w. After that, we can paste ('yank') the text with C-y. If you are used to Ctrl-X/Ctrl-C/Ctrl-V for cut/copy/paste, you could of course redefine these keys. However, especially Ctrl-X (C-x) is used in many places in emacs, and this would probably lead to tears.
However, there is cua-mode, which enables you to do that; it's smart in the sense that C-x works as 'Cut' in other systems, but it does not affect the normal usage of C-x in emacs. To enable cua-mode, add the following to your .emacs:
(cua-mode t)Side-note: it's called 'cua-mode', because of the CUA-standard defined by IBM.
1 comment:
There is an alternate CUA mode called CUA-Lite: http://www.emacswiki.org/emacs/CuaLightMode
Post a Comment