Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer?As the wording of the question above probably suggests, I'm looking for something that I can run from the command line.  I'm thinking of an interaction like:% syntax_highlight <SOURCE_FILE> | lp...with command-line switches as needed, etc.The best I've found so far is a Unix utility called highlight, but it has problems.  The most serious of it is that it doesn't have an option to output PostScript directly.  (Since highlight does support LaTeX output, I tried to patch together a script that would automate the process of generating the PostScript file via *.tex => *.dvi => *.ps, but the visual appearance of the final result is awful, much worse than it is for the HTML file that highlight generates for the same source code input.)Thanks!
syntax_highlight  | lpr
command line;printing;highlighting;postscript
You can use vim.vim -c hardcopy -c quit /path/to/fileThis will print the file and quit immediately. By default, vim prints with syntax highlighting.If you need to print from stdout of some command, you can do this:cat some_file.c | vim -c hardcopy -c 'quit!' -If you want to save the .ps for later, you can do that by adding redirection to the hardcopy command, like so:vim -c 'hardcopy > /path/to/saved.ps' -c 'quit' /path/to/fileVim lets you set lots of printing-related options, so you might want to see the documentation if you want to tweak it. Of course, there are lots of syntax highlighting options as well.