: hardcopy file in vim with full colors

I would like to print some files that I edited in MacVIM using full color , including a dark background.

Of course, I won't send it to the printer, I just want to save it as a PDF.

: hardcopy removes background and applies ugly scheme.

Is it possible?

+2


source to share


2 answers


Quote from: help: hardcopy

The printout uses the current backlight colors for the following reasons:

1) Normal background is always displayed as white (i.e. blank paper).

2) White text or foreground is displayed as black by default for it to show!

3) If the "background" is "dark", the colors are darkened to compensate for the fact that they would otherwise be too bright for white paper.

So it seems that the answer is there, you can't: hardcopy.



He also gives the following note:

Note. If you have trouble printing: hardcopy, an alternative is to use: TOhtml and print the resulting html file from the browser.

If that's an option, this would be the easiest way to do it.

+6


source


Rather use :TOhtml

(this is a plugin that is usually included at runtime by Vim by default): type Q to enter Ex mode, then:



let html_number_lines=1
let html_no_pre=0
TOhtml
w
visual

      

+6


source







All Articles