Code beautification and/or printing utilities that are not part of an editor

Tom Evans tevans.uk at googlemail.com
Fri Apr 20 09:27:30 UTC 2007


On Fri, 2007-04-20 at 10:23 +0100, Tom Evans wrote:
> On Thu, 2007-04-19 at 15:10 -0600, Andrew Falanga wrote:
> > Another question for everyone.  Are there any programs, hopefully
> > available in the ports, that one can use to print source code files to
> > a printer (or create as a postscript file)?
> > 
> > I'd like something that I can feed a C++ program, have it parse
> > through the code, print line numbers to the left of the page and
> > (optionally) color code the syntax.  Does anything like this exist?
> > 
> > If it's something as simple as a string of chained command line aps,
> > hey, that's fine.  Please someone point me in the correct direction.
> > 
> > Andy
> > _______________________________________________
> > freebsd-questions at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 
> Assuming you can print with lpr(1):
> 
> vim "+syntax enable" "+number" "+hardcopy" file.cc
> 
> I'd put "syntax enable" in your ~/.vimrc , and the other attrs can be
> shortened to:
> 
> vim "+nu" "+ha" file.cc

My bad, I hadn't actually tried that!

The correct version should be:

vim "+syntax enable" "+set printoptions=number:y" "+hardcopy" file.cc
vim "+syntax enable" "+set popt=number:y" "+ha" file.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070420/bac3450d/attachment.pgp


More information about the freebsd-questions mailing list