| |||||
Contents |
Current Version: - tal-1.9.tar.gz - tal19-win32-src.zip (Win32 port by Bernard Martis) - tal19-win32.zip (Win32 binary by Bernard Martis) - tal19dos.zip (DOS binary by Bernard Martis) Previous Versions: - tal-1.8.tar.gz - tal-1.7.tar.gz - DOS binary of 1.7 (port by Y.C. Lee) - tal-1.5.tar.gz |
tal is a filter that reads in a number of lines from
standard input, then tries to determine an ending that all those lines have
in common. Those common trailing characters (from now on called a
'trailer') are subsequently aligned, so that they all begin and end on the
same column of text.
This can be used to repair 'broken boxes' or align the backslashes on long
macro definitions in C programs. But for that matter, tal
will work on any kind of common ending. tal is especially
useful as a filter for the
vim text editor.
Here's a very simple example with C comment tags:
/* abracadabra*/ /* abracadabra */ /* wow the sun is*/ /* wow the sun is */ /* shining */ ===tal===> /* shining */ /* oooh yeah! */ /* oooh yeah! */ /* so nice ... */ /* so nice ... */More examples can be found on the examples page.
tal offers many options that make it adjustable to almost any situation, like one to make the trailers end at a particular column, specify their length, add padding, and so on. Please review the man page that comes with the archive for an in-depth explanation of all options and the general usage of tal. If you want to view the manpage before installing it in your MANPATH, you may use the postscript version or the command
nroff -man ./tal.1 | lessin order to have it formatted and displayed at the command line.
gtar xfvz tal-1.9.tar.gzIf you don't have gtar, use gunzip first and then tar, leaving out the z option.
|
|
vmap ,t !tal<CR> or vmap ,t !tal -p 0<CR>to your ~/.vimrc. This way, you can select the lines using visual mode, then press ',t' to have the trailers aligned.
input: foo one dum bar two di tralala three dei output: foo one dum bar two di tralala three dei
SEE ALSO: boxes, the
box drawing filter