Enter picture mode (ESC-x picture-mode)
Marking rectangle
- Go to top left corner, press CTRL-Space.
- Go to bottom right, press CTRL-x-x (This selects the rectangle)
Working on rectangle
- Press CTRL-x-r-k to kill the rectangle (and make it available as ‘last-killed-rectangle’)
- Press CTRL-x-r-d to delete the rectangle
- Press CTRL-x-r-y to yank ‘last-killed-rectangle’ with its top right at the mark.
Press ESC-x-clear-rectangle to fill the rectangle with spaces.
Finally quit the picture mode with CTRL-c-c
Comments 3
Thanks for the helpful commands. However the CTRL-c-c doesnt quit the mode, I used ESC thrice instead
Posted 03 Jan 2007 at 12:54 pm ¶-Vaibhav
I think that using picture mode is not necessary.
Posted 10 Jan 2007 at 3:06 am ¶You could simply select the text as usual and then use the rectangle commands.
—
Luca
Vaibhav: I tried on gnu emacs and xemacs, in both, I was able to quit picture mode by CTRL-c-c. Maybe your environment has unbounded the key combination or bound it to something else. Try full commands instead of keystrokes: i.e. ESC-x-kill-rectangle ESC-x-delete-rectangle , ESC-x-yank-rectangle and ESC-x-clear-rectangle.
Luca: Without picture mode, you cannot select a rectangle, only multiple lines. (Update it seems you can still use the full commands, but you lose the keybindings)
Posted 10 Jan 2007 at 6:05 am ¶Post a Comment