Thursday, May 12, 2005
Monday, May 02, 2005
rectangle select in Emacs
Working with rows & columns (rectangles)
A "rectangle" is one or more columns of text in one or more rows. Commands are available to delete rectangles, fill them with spaces, or cut and paste them.
To delineate a rectangle for a command to work on, set a mark in the first row to the left of the first column (i.e., the top left of the rectangle).
Move the cursor to the last row, then to the right of the last column (i.e. the bottom right of the rectangle).
To delete the rectangle, type Esc-x delete-rectangle
To cut a rectangle, type Esc-x kill-rectangle
To paste a killed rectangle in a new location, move the cursor to wherever the rectangle is to go and type Esc-x yank-rectangle
To replace the contents of a rectangle with spaces, type Esc-x clear-rectangle
To fill the area of the rectangle with spaces and push the original rectangle right, type Esc-x open-rectangle