Eclipse C ++漂亮打印? [英] Eclipse C++ pretty printing?
本文介绍了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 man page 。
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屋!
查看全文