Department of Engineering

IT Services

Manipulating blocks of text

Using the Mouse -

The Cut option in the Edit menu lets you remove blocks of text. To delete a block of text, place the cursor at the start of the text that you wish to remove and drag over the text holding the left mouse button down. Then click on Cut. A faster way to cut text is to click at one end with the left mouse button, then double-click at the other end with the right mouse button.

If you want to restore the text, just click on the new destination with the middle mouse button.

To copy some text, place the cursor at the start and hold the left mouse button down while dragging the pointer over the text you want to copy. Release the mouse button when you reach the end of the text. Now don't select Cut, just move the pointer where you want the text to be copied and press the middle mouse button. This facility also works between most kinds of text windows.

Using Keys -

Mark one end of the region by moving the cursor there and using C-<Space>. Move the cursor to the other end of the region. Use C-w to pick up the text and remove it; M-w to just pick up. Move the text cursor where you want the text to be pasted and type C-y

If you want to manipulate rectangles of text, mark one corner of the region, move the cursor to a diametrically opposite corner and use these commands:-

C-x r k
C-x r y