diff options
| author | Kim F. Storm | 2005-11-09 23:22:11 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-11-09 23:22:11 +0000 |
| commit | 95a0306cc32ac4e5849ac1ce662d7f93a87cc740 (patch) | |
| tree | 40db86c6f7426816fec07192544dabbd5768492d | |
| parent | 318aa7bae10ff2ef671244e1dd7aa6d9136aa2e7 (diff) | |
| download | emacs-95a0306cc32ac4e5849ac1ce662d7f93a87cc740.tar.gz emacs-95a0306cc32ac4e5849ac1ce662d7f93a87cc740.zip | |
* killing.texi (CUA Bindings): New node. Moved here from
misc.texi and extended with info on rectangle commands and
rectangle highlighting, interface to registers, and the global
mark feature.
| -rw-r--r-- | man/killing.texi | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/man/killing.texi b/man/killing.texi index bcb170ac265..e6538a608e2 100644 --- a/man/killing.texi +++ b/man/killing.texi | |||
| @@ -520,7 +520,7 @@ of the specified file. The file is changed immediately on disk. | |||
| 520 | editing in Emacs would change the file behind Emacs's back, which | 520 | editing in Emacs would change the file behind Emacs's back, which |
| 521 | can lead to losing some of your editing. | 521 | can lead to losing some of your editing. |
| 522 | 522 | ||
| 523 | @node Rectangles, Registers, Accumulating Text, Top | 523 | @node Rectangles, CUA Bindings, Accumulating Text, Top |
| 524 | @section Rectangles | 524 | @section Rectangles |
| 525 | @cindex rectangle | 525 | @cindex rectangle |
| 526 | @cindex columns (and rectangles) | 526 | @cindex columns (and rectangles) |
| @@ -644,6 +644,51 @@ rectangle shifts right. | |||
| 644 | @code{string-rectangle}, but inserts the string on each line, | 644 | @code{string-rectangle}, but inserts the string on each line, |
| 645 | shifting the original text to the right. | 645 | shifting the original text to the right. |
| 646 | 646 | ||
| 647 | @node CUA Bindings, Registers, Rectangles, Top | ||
| 648 | @findex cua-mode | ||
| 649 | @vindex cua-mode | ||
| 650 | @cindex CUA key bindings | ||
| 651 | @vindex cua-enable-cua-keys | ||
| 652 | The command @kbd{M-x cua-mode} sets up key bindings that are | ||
| 653 | compatible with the Common User Access (CUA) system used in many other | ||
| 654 | applications. @kbd{C-x} means cut (kill), @kbd{C-c} copy, @kbd{C-v} | ||
| 655 | paste (yank), and @kbd{C-z} undo. Standard Emacs commands like | ||
| 656 | @kbd{C-x C-c} still work, because @kbd{C-x} and @kbd{C-c} only take | ||
| 657 | effect when the mark is active. However, if you don't want these | ||
| 658 | bindings at all, set @code{cua-enable-cua-keys} to @code{nil}. | ||
| 659 | |||
| 660 | In CUA mode, using @kbd{Shift} together with the movement keys | ||
| 661 | activates the region over which they move. The standard (unshifted) | ||
| 662 | movement keys deactivate the mark, and typed text replaces the active | ||
| 663 | region as in Delete-Selection mode (@pxref{Graphical Kill}). | ||
| 664 | |||
| 665 | @cindex rectangle highlighting | ||
| 666 | CUA mode provides enhanced rectangle support with visible | ||
| 667 | rectangle highlighting. Use @kbd{C-RET} to start a rectangle, | ||
| 668 | extend it using the movement commands, and cut or copy it using | ||
| 669 | @kbd{C-x} or @kbd{C-c}. When a rectangle is active, text you type is | ||
| 670 | automatically inserted before or after each line in the rectangle. | ||
| 671 | |||
| 672 | With CUA you can easily copy text and rectangles into and out of | ||
| 673 | registers by providing a one-digit numeric prefix the the kill, copy, | ||
| 674 | and yank commands, e.g. @kbd{C-1 C-c} copies the region into register | ||
| 675 | @code{1}, and @kbd{C-2 C-v} yanks the contents of register @code{2}. | ||
| 676 | |||
| 677 | @cindex global mark | ||
| 678 | CUA mode also has a global mark feature which allows easy moving and | ||
| 679 | copying of text between buffers. Use @kbd{C-S-SPC} to toggle the | ||
| 680 | global mark on and off. When the global mark is on, all text that you | ||
| 681 | kill or copy is automatically inserted at the global mark, and text | ||
| 682 | you type is inserted at the global mark rather than at the current | ||
| 683 | position. | ||
| 684 | |||
| 685 | For example, to copy words from various buffers into a word list in | ||
| 686 | a given buffer, set the global mark in the target buffer, then | ||
| 687 | navigate to each of the words you want in the list, mark it (e.g. with | ||
| 688 | @kbd{S-M-f}), copy it to the list with @kbd{C-c} or @kbd{M-w}, and | ||
| 689 | insert a newline after the word in the target list by pressing | ||
| 690 | @key{RET}. | ||
| 691 | |||
| 647 | @ifnottex | 692 | @ifnottex |
| 648 | @lowersections | 693 | @lowersections |
| 649 | @end ifnottex | 694 | @end ifnottex |