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:
tc-two-columns
). If the right-hand buffer doesn't already
exist, it starts out empty; the current buffer's contents are not
changed.
This command is appropriate when the current buffer contains just one
column and you want to add another column.
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 temporarily.
tc-associate-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 that spans both columns while in two-column mode: write it in the left-hand buffer, and put an empty line in the right-hand buffer.)
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:
tc-scroll-up
).
tc-scroll-down
).
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.