Pages

Wednesday, August 29, 2007

Viewing man pages and text files in Skim

As discussed on the Skim wiki, it is possible to view man pages (and more) nicely formatted as a PDF in Skim.

If you use bash, try adding these lines to your .bashrc:
function skimcat () { cat $* | enscript -p - | open -f -a Skim; }
function manp () { man -t $* | open -f -a Skim; }
Alternatively, if you use tcsh, try adding these lines to your .cshrc:
alias skimcat="cat \!* | enscript -p - | open -f -a Skim"
alias manp="man -t \!* | open -f -a Skim"
Then you'll be able to do skimcat to cat files to Skim, and you'll be able to use manp to view man pages formatted in Skim.

NOTE: You can actually pipe anything that is PostScript (or PDF) formatted to Skim (via the open command shown above).

No comments:

Post a Comment