Next: , Previous: , Up: Picture   [Contents][Index]


24.1 Basic Editing in Picture Mode

Most keys do the same thing in Picture mode that they usually do, but do it in a quarter-plane style. For example, C-f is rebound to run picture-forward-column, which moves point one column to the right, by inserting a space if necessary, so that the actual end of the line makes no difference. C-b is rebound to run picture-backward-column, which always moves point left one column, converting a tab to multiple spaces if necessary. C-n and C-p are rebound to run picture-move-down and picture-move-up, which can either insert spaces or convert tabs as necessary to make sure that point stays in exactly the same column. C-e runs picture-end-of-line, which moves to after the last non-blank character on the line. There was no need to change C-a, as the choice of screen model does not affect beginnings of lines.

Insertion of text is adapted to the quarter-plane screen model through the use of Overwrite mode (see Minor Modes). Self-inserting characters replace existing text, column by column, rather than pushing existing text to the right. RET runs picture-newline, which just moves to the beginning of the following line so that new text will replace that line.

Text is erased instead of deleted and killed. DEL (picture-backward-clear-column) replaces the preceding character with a space rather than removing it. C-d (picture-clear-column) does the same in a forward direction. C-k (picture-clear-line) really kills the contents of lines, but never removes the newlines from a buffer.

To do actual insertion, you must use special commands. C-o (picture-open-line) creates a blank line, but does so after the current line; it never splits a line. C-M-o, split-line, makes sense in Picture mode, so it remains unchanged. LFD (picture-duplicate-line) inserts another line with the same contents below the current line.

To actually delete parts of the picture, use C-w, or with C-c C-d (which is defined as delete-char, as C-d is in other modes), or with one of the picture rectangle commands (see Rectangles in Picture).


Next: , Previous: , Up: Picture   [Contents][Index]