Eclipse C ++漂亮的打印? [英] Eclipse C++ pretty printing?

查看:262
本文介绍了Eclipse C ++漂亮的打印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Eclipse打印C ++源时得到的输出是相当难看的。

The output we get when printing C++ sources from Eclipse is rather ugly.

有没有办法/一个插件来漂亮打印C ++源代码,例如使用a2ps(这可能是C源代码的另一个过滤器)?

Is there are way/a plugin to pretty print C++ source code like e.g. with a2ps (which is probably using yet another filter for C source code)?

推荐答案

我也使用 enscript 为此。这是我经常使用的别名:

I also use enscript for this. Here's an alias I often use:


alias cpp2ps='enscript --color --pretty-print=cpp --language=PostScript'

,我使用如下:


cpp2ps -P main.ps main.cpp

enscript 包括旋转,2列输出,行号,页眉/页脚等。查看 enscript手册页

There are several other great options in enscript including rotating, 2-column output, line numbers, headers/footers, etc. Check out the enscript man page.

此外,在Mac上,XCode非常好地打印C ++代码。

Also, on Macs, XCode prints C++ code very nicely.

这篇关于Eclipse C ++漂亮的打印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆