Changing printing colours

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing printing colours

Gerard Sharpe
Hi all,

First post to the list so take it easy on me :)

I've setup VIM to use the standard syntax colours (in /etc/vim/vimrc 'syntax
on'), all looks good however my problem is that when I print out java code
the colour yellow is almost impossible to read. The interesting thing is the
corresponding text in VIM is not yellow!

My question is how can I change the PRINTED colours used by VIM?

Thanks in advance.

R
Gerard

Reply | Threaded
Open this post in threaded view
|

Re: Changing printing colours

A.J.Mechelynck
----- Original Message -----
From: "Gerard Sharpe" <[hidden email]>
To: <[hidden email]>
Sent: Monday, August 15, 2005 3:44 PM
Subject: Changing printing colours


> Hi all,
>
> First post to the list so take it easy on me :)
>
> I've setup VIM to use the standard syntax colours (in /etc/vim/vimrc
> 'syntax
> on'), all looks good however my problem is that when I print out java code
> the colour yellow is almost impossible to read. The interesting thing is
> the
> corresponding text in VIM is not yellow!
>
> My question is how can I change the PRINTED colours used by VIM?
>
> Thanks in advance.
>
> R
> Gerard

From ":help popt-option" (and I found it by a link at 'printoptions' which
had a link at ":hardcopy"): include "syntax:n" in your 'printoptions' to
force black-on-white printing throughout, even on a colour printer.

The difference between the colours in Vim and those on the printer may be
due (I'm not sure) to having 256 colors or more (up to 32M) in the GUI and
only 8 or 16 (assimilated to cterm highlights) on the printer. In addition,
if your 'background' is "dark" there will be some more changes to compensate
for the fact that the background (the paper) is white when printing.

You may also use a different colour scheme when printing (see ":help
:colorscheme")

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Changing printing colours

Tim Chase-2
In reply to this post by Gerard Sharpe
> I've setup VIM to use the standard syntax colours (in
> /etc/vim/vimrc 'syntax on'), all looks good however my problem
> is that when I print out java code the colour yellow is almost
> impossible to read. The interesting thing is the corresponding
> text in VIM is not yellow!

That's strange, as (IIUC) Vim just prints in standard text-mode
to the printer of choice.  My first thought would be that your
printer is running low on Cyan & Magenta ink ;)  However, a
little further investigation seems to show that when printed to a
postscript printer, it does try and use the colors that were
shown.  Several possibilities exist, but my first guess is that
your colorscheme has both a "dark" and a "light" setting.  If
your screen colors are of the "dark" variety, printing might use
the colorscheme's "light" settings because they're printing on
light paper.

> My question is how can I change the PRINTED colours used by
> VIM?

Another alternative might be to use the 2html.vim script, such as

        :source $RUNTIME/syntax/2html.vim

This will spit out an HTML file that you can pull up in your
favorite browser and print with all the pretty colors included :)

Avenues for further ideas:

        :help 'background'
        :help 2html.vim
        :help colorscheme

Hope this helps you find a solution,

-tim