Loading ...
Sorry, an error occurred while loading the content.

Colored line numbers when printing

Expand Messages
  • Mike Williams
    Hi, Someone asked for an option to control the color of line numbers when printing a while back, and here is a patch for it. The attached patch gives
    Message 1 of 4 , Aug 4, 2002
    • 0 Attachment
      Hi,

      Someone asked for an option to control the color of line numbers when
      printing a while back, and here is a patch for it. The attached
      patch gives printoptions a 'numbercolor' item which takes a color
      specification in #rrggbb format - it's as simple as that. Doc update
      is included.

      Patch is against 6.1p143. Enjoy.

      Mike
      --
      A fool learns from his mistakes, a wise man from someone elses.
    • Bram Moolenaar
      ... Why not use the LineNr highlighting? -- I AM THANKFUL... ...for all the complaining I hear about the government because it means we have freedom of
      Message 2 of 4 , Aug 4, 2002
      • 0 Attachment
        Mike Williams wrote:

        > Someone asked for an option to control the color of line numbers when
        > printing a while back, and here is a patch for it. The attached
        > patch gives printoptions a 'numbercolor' item which takes a color
        > specification in #rrggbb format - it's as simple as that. Doc update
        > is included.

        Why not use the "LineNr" highlighting?

        --
        I AM THANKFUL...
        ...for all the complaining I hear about the government
        because it means we have freedom of speech.

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
      • Mike Williams
        Doh! Tidying up old emails I found one from you mentioning an additional printoption for this and didn t think further. ... Mike -- I either want less
        Message 3 of 4 , Aug 5, 2002
        • 0 Attachment
          Doh! Tidying up old emails I found one from you mentioning an
          additional printoption for this and didn't think further.

          On 4 Aug 2002 at 13:28, Bram Moolenaar wrote:

          >
          > Mike Williams wrote:
          >
          > > Someone asked for an option to control the color of line numbers when
          > > printing a while back, and here is a patch for it. The attached
          > > patch gives printoptions a 'numbercolor' item which takes a color
          > > specification in #rrggbb format - it's as simple as that. Doc update
          > > is included.
          >
          > Why not use the "LineNr" highlighting?
          >
          > --
          > I AM THANKFUL...
          > ...for all the complaining I hear about the government
          > because it means we have freedom of speech.
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          > /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
          > \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
          > \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///

          Mike
          --
          I either want less corruption, or a chance to participate.
        • Mike Williams
          Hi, Here is a revised patch for colored line numbers when printing that the uses the LineNr highlight settings. The code for setting the printing attributes
          Message 4 of 4 , Aug 17, 2002
          • 0 Attachment
            Hi,

            Here is a revised patch for colored line numbers when printing that
            the uses the LineNr highlight settings. The code for setting the
            printing attributes has been simplified by separating defining the
            attributes and setting them for printing text.

            The default for line numbers with no syntax highlighting is as before
            - italic and 50% grey on a color capable printer or black otherwise.

            You may get unexpected output if you are printing from the GUI and
            have guibg defined for LineNr (VIM does not support background
            printing from color terminals). The solution is to ensure guibg is
            set to NONE or bg, unless of course you want a colored background to
            line numbers when printing.

            The patch is against 143 and works with Windows and PostScript
            printing. Let me know what you think.

            TTFN

            Mike
            --
            It is a miracle that curiosity survives formal education.
          Your message has been successfully submitted and would be delivered to recipients shortly.