Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2007 10:27:26 +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:  <1177061246.1279.8.camel@zoot.mintel.co.uk>
In-Reply-To: <1177060993.1279.6.camel@zoot.mintel.co.uk>
References:  <340a29540704191410l1d45f0c4w9af97f8ec324f405@mail.gmail.com> <1177060993.1279.6.camel@zoot.mintel.co.uk>

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

--=-6DGKBSEe+m0A6iS3Od1b
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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)?
> >=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=
.org"
>=20
> Assuming you can print with lpr(1):
>=20
> vim "+syntax enable" "+number" "+hardcopy" file.cc
>=20
> I'd put "syntax enable" in your ~/.vimrc , and the other attrs can be
> shortened to:
>=20
> vim "+nu" "+ha" file.cc

My bad, I hadn't actually tried that!

The correct version should be:

vim "+syntax enable" "+set printoptions=3Dnumber:y" "+hardcopy" file.cc
vim "+syntax enable" "+set popt=3Dnumber:y" "+ha" file.cc

--=-6DGKBSEe+m0A6iS3Od1b
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)

iD8DBQBGKId6lcRvFfyds/cRAtFRAKCAHySccN3xfOsFQ7zxwR7faFSLlACgk301
7o6C2RCRSdb+fkCdMofBaa8=
=Q4pj
-----END PGP SIGNATURE-----

--=-6DGKBSEe+m0A6iS3Od1b--




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