Next: Editing Binary Files Prev: Hardcopy Up: Top
Two-column mode lets you conveniently edit two side-by-side columns
of text. It uses two side-by-side windows, each showing its own buffer.
There are three ways to enter two-column mode:
`C-x 6 2'
Enter two-column mode with the current buffer on the left, and on
the right, a buffer whose name is based on the current buffer's
name (`tc-two-columns'). If the right-hand buffer doesn't already
exist, it starts out empty; the current buffer's contents are not
This command is appropriate when the current buffer contains just
one column and you want to add another column.
`C-x 6 s'
Split the current buffer, which contains two-column text, into two
buffers, and display them side by side (`tc-split'). The current
buffer becomes the left-hand buffer, but the text in the right-hand
column is moved into the right-hand buffer. The current column
specifies the split point. Splitting starts with the current line
and continues to the end of the buffer.
This command is appropriate when you have a buffer that already
contains two-column text, and you wish to separate the columns
`C-x 6 b BUFFER RET'
Enter two-column mode using the current buffer as the left-hand
buffer, and using buffer BUFFER as the right-hand buffer
`C-x 6 s' looks for a column separator which is a string that
appears on each line between the two columns. You can specify the width
of the separator with a numeric argument to `C-x 6 s'; that many
characters, before point, constitute the separator string. By default,
the width is 1, so the column separator is the character before point.
When a line has the separator at the proper place, `C-x 6 s' puts
the text after the separator into the right-hand buffer, and deletes the
separator. Lines that don't have the column separator at the proper
place remain unsplit; they stay in the left-hand buffer, and the
right-hand buffer gets an empty line to correspond. (This is the way
to write a line which "spans both columns while in two-column mode:
write it in the left-hand buffer, and put an empty line in the
It's not a good idea to use ordinary scrolling commands during
two-column editing, because that separates the two parts of each split
line. Instead, use these special scroll commands:
`C-x 6 SPC'
Scroll both buffers up, in lockstep (`tc-scroll-up').
`C-x 6 DEL'
Scroll both buffers down, in lockstep (`tc-scroll-down').
`C-x 6 C-l'
Recenter both buffers, in lockstep (`tc-recenter').
When you have edited both buffers as you wish, merge them with `C-x
6 1' (`tc-merge'). This copies the text from the right-hand buffer as
a second column in the other buffer. To go back to two-column editing,
use `C-x 6 s'.
Use `C-x 6 d' to disassociate the two buffers, leaving each as it
stands (`tc-dissociate'). If the other buffer, the one not current
when you type `C-x 6 d', is empty, `C-x 6 d' kills it.
automatically generated by info2www