Monday, October 15, 2012

Re: VimDiff printing - close but no cigar - Success!

Ben,


On 2012-10-16 03:12, Philip Rhoades wrote:
> Ben,
>
>
> On 2012-10-13 07:51, Ben Fritz wrote:
>> On Friday, October 12, 2012 2:30:29 PM UTC-5, Philip Rhoades wrote:
>>>
>>> > What are you seeing? Can you attach some sample output, or at
>>> least
>>> > the <meta> lines in the generated output?
>>>
>>> <meta http-equiv="content-type" content="text/html;
>>> charset=iso-8859-1">
>>> <title>diff</title>
>>> <meta name="Generator" content="Vim/7.3">
>>> <meta name="plugin-version" content="vim7.3_v6">
>>> <meta name="settings" content="use_css,whole_filler">
>>>
>>
>> This explains it, thanks.
>>
>> You're missing several updates to the TOhtml plugin, including the
>> version which adds html_pre_wrap:
>>
>> | 7.3_v12 (this version): Fix modeline mangling to also work for
>> when multiple
>> | highlight groups make up the
>> start-of-modeline text.
>> | Improve render time of page with
>> uncopyable regions
>> | by not using one-input-per-char. Change
>> name of
>> | uncopyable option from html_unselectable
>> to
>> | html_prevent_copy. Added html_no_invalid
>> option and
>> | default to inserting invalid markup for
>> uncopyable
>> | regions to prevent MS Word from pasting
>> undeletable
>> | <input> elements. Fix 'cpo' handling
>> (Thilo Six).
>> | 7.3_v12b1: Add html_unselectable option. Rework
>> logic to
>> | eliminate post-processing substitute
>> commands in
>> | favor of doing the work up front. Remove
>> unnecessary
>> | special treatment of 'LineNr' highlight
>> group. Minor
>> | speed improvements. Fix modeline
>> mangling in
>> | generated output so it works for text in
>> the first
>> | column. Fix missing line number and fold
>> column in
>> | diff filler lines. Fix that some fonts
>> have a 1px
>> | gap (using a dirty hack, improvements
>> welcome). Add
>> | "colorscheme" meta tag. Does NOT include
>> support for
>> | the new default foldtext added in v11,
>> as the patch
>> | adding it has not yet been included in
>> Vim.
>> | 7.3_v11 ( unreleased ): Support new default foldtext from patch
>> by Christian
>> | Brabandt in
>> |
>> http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
>> | This patch has not yet been included in
>> Vim, thus
>> | these changes are removed in the next
>> version.
>> | 7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range
>> wholly inside
>> | multiple nested folds with dynamic
>> folding on.
>> | Also fix problem with foldtext in this
>> situation.
>> | 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with
>> html_use_css
>> | and without html_no_pre, default value
>> same as
>> | 'wrap' option, (Andy Spencer). Don't use
>> | 'fileencoding' for converted document
>> encoding if
>> | 'buftype' indicates a special buffer
>> which isn't
>> | written.
>> | 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow
>> leaving tab
>> | characters in generated output (Andy
>> Spencer).
>> | Escape text that looks like a modeline
>> so Vim
>> | doesn't use anything in the converted
>> HTML as a
>> | modeline. Bugfixes: Fix folding when a
>> fold starts
>> | before the conversion range. Remove fold
>> column when
>> | there are no folds.
>> | 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
>> | 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all
>> the way.
>> | 7.3_v7b2: Remove automatic detection of encodings
>> that are not
>> | supported by all major browsers
>> according to
>> |
>> http://wiki.whatwg.org/wiki/Web_Encodings and
>> | convert to UTF-8 for all Unicode
>> encodings. Make
>> | HTML encoding to Vim encoding detection
>> be
>> | case-insensitive for built-in pairs.
>> | 7.3_v7b1: Remove use of setwinvar() function which
>> cannot be
>> | called in restricted mode (Andy
>> Spencer). Use
>> | 'fencoding' instead of 'encoding' to
>> determine by
>> | charset, and make sure the 'fenc' of the
>> generated
>> | file matches its indicated charset. Add
>> charsets for
>> | all of Vim's natively supported
>> encodings.
>>
>> You can fix it in three different ways:
>>
>> 1. Install the latest Vim (probably from source) including the
>> latest
>> runtime file updates.
>
>
> Used: vim-common-7.3.515-2.fc16.x86_64
>
>
>> 2. Get the latest runtime files for just TOhtml and stick them in
>> ~/.vim to override the old ones in your distribution (just remember
>> to
>> remove them when you upgrade you distribution). They are intended to
>> work with older Vims as well. You will need:
>>
>> http://code.google.com/p/vim/source/browse/runtime/autoload/tohtml.vim
>>
>> http://code.google.com/p/vim/source/browse/runtime/plugin/tohtml.vim
>>
>> http://code.google.com/p/vim/source/browse/runtime/syntax/2html.vim
>> and optionally (for the documentation):
>> http://code.google.com/p/vim/source/browse/runtime/doc/syntax.txt
>> 3. Use the html_no_pre option instead of html_pre_wrap. This will
>> remove the <pre> tag from the output, which will allow text
>> wrapping.
>> But it can also cause it to not look as nice. With an appropriate
>> colorscheme and font, it should not be too much of a problem.
>
>
> Success! Thanks for that! Now one remaining thing to do - is this
> process scriptable somehow?


To answer my own question - I worked out how scriptify the process
using the -w and -s vim startup switches.

Thanks,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: