tal 1.9

tal is a filter that reads in a number of lines from standard input.
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.

The tal project 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 | less

in order to have it formatted and displayed at the command line.

Installation:

Since the program uses only very basic C functions, installation should be quite easy.

Download the tar'red and zip'ed archive using a link from the top of this page.

Extract the files using

gtar xfvz tal-1.9.tar.gz

If you don't have gtar, use gunzip first and then tar, leaving out the z option.

If you have the OS environment variable set correctly, just type make. Else type 'make youros' where youros is one of the following:

aix41
hpux9
hpux10
irix5 (for SGI)
irix6 (for SGI)
linux
osf1 (for DEC)
sunos4
sunos5

If your platform is not on the list, try all of the ones that are on the list. You stand a good chance that one of them is working for you. Anyway, the program is so simple that compiling it really shouldn't be an insurmountable task.

After you have successfully compiled it, copy the resulting binary into a directory that's in your PATH, and copy the man page into section 1 of a manpage location that's in the MANPATH.

MS-DOS Users: The DOS binary you can download from the top of the page is ready "as is". Just download and use.

For use with vim, it might be nice to add a line like

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.

What's New in This Release:

Maxalign feature can now be disabled by setting its value to 0
Changed default for maxalign to 0 (some users were confused)
Updates and corrections on the manual page
Clearly marked editable default values in source file
Added -e option (explicit trailer specification)
Added -i option (ignore case)

last updated on:
March 4th, 2008, 10:29 GMT
price:
FREE!
developed by:
Thomas Jensen
license type:
GPL (GNU General Public License) 
category:
ROOT \ Text Editing&Processing \ Others

FREE!

In a hurry? Add it to your Download Basket!

user rating 15

UNRATED
2.1/5
 

0/5

Add your review!

SUBMIT