Syntax hilighted printouts from vim

To print from vim, first set the following options in vimrc or directly in vim:

:set printoptions=paper:A4,portrait:n,wrap:y,syntax:y,duplex:long

if landscape mode is wanted, set portrait:n, else set portrait:y

next, from vim, create a postscript file using the hardcopy command:

ha > %.ps

Now transfer the postscript file to a box with a printer, and print it out, or convert it to pdf using ps2pdf.
Dette indlæg blev udgivet i Knowledge Base, Vim. Bogmærk permalinket.

Skriv et svar