Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2007 10:23:13 +0100
From:      Tom Evans <tevans.uk@googlemail.com>
To:        Andrew Falanga <af300wsm@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Code beautification and/or printing utilities that are not part of an editor
Message-ID:  <1177060993.1279.6.camel@zoot.mintel.co.uk>
In-Reply-To: <340a29540704191410l1d45f0c4w9af97f8ec324f405@mail.gmail.com>
References:  <340a29540704191410l1d45f0c4w9af97f8ec324f405@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-3BuuEhG4yGSlD3/eXU4j
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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)?
>=20
> 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?
>=20
> 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.
>=20
> Andy
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"

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

--=-3BuuEhG4yGSlD3/eXU4j
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQBGKIZ3lcRvFfyds/cRAnZ3AJ0VJ9Rq7IW21mfsLxBEfJiJDuRQIgCfdGMY
m6k/WC7nCoZ9gG/pHlcwHRc=
=x0mK
-----END PGP SIGNATURE-----

--=-3BuuEhG4yGSlD3/eXU4j--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1177060993.1279.6.camel>