Mercurial > emacs
comparison man/killing.texi @ 66782:e30f43430f3c
* 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.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 09 Nov 2005 23:22:11 +0000 |
parents | 3723093a21fd |
children | 0d11e9f86005 |
comparison
equal
deleted
inserted
replaced
66781:3f1b7ae24ffc | 66782:e30f43430f3c |
---|---|
518 You should use @code{append-to-file} only with files that are | 518 You should use @code{append-to-file} only with files that are |
519 @emph{not} being visited in Emacs. Using it on a file that you are | 519 @emph{not} being visited in Emacs. Using it on a file that you are |
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) |
527 @cindex killing rectangular areas of text | 527 @cindex killing rectangular areas of text |
528 | 528 |
642 @findex string-insert-rectangle | 642 @findex string-insert-rectangle |
643 The command @kbd{M-x string-insert-rectangle} is similar to | 643 The command @kbd{M-x string-insert-rectangle} is similar to |
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 |
650 | 695 |
651 @ignore | 696 @ignore |