A rectangle in emacs is defined just as a "region" is: between the "mark" and the "point". Set the "mark" using control-space. Then navigate the cursor to some other character. The location of the cursor is the "point". These two locations are the beginning and end of the region, and they are also the opposite corners of the current rectangle, for rectangle commands.
The two I use most are "kill-rectangle" at "control-x r k" and yank that back in over and over with "yank-rectangle" at "control-x r y".
Em, but maybe you need to store a number of rectangles and yank them back in randomly. well...
"copy-rectangle-to-register" at "control-x r r". what? you do know about emacs registers, right? super-cool... next time.
1 comment:
Check out the rectangle support built into cua-mode:
http://trey-jackson.blogspot.com/2008/10/emacs-tip-26-cua-mode-specifically.html
I really like the visual feedback and the insertion modes.
-- Lauri
Post a Comment