<?xml version="1.0" encoding="windows-1252"?>
<node id="605704" title="Re: Text::VimColor in a CGI - possible?" created="2007-03-20 12:45:38" updated="2007-03-20 08:45:38">
<type id="11">
note</type>
<author id="474411">
chargrill</author>
<data>
<field name="doctext">
&lt;p&gt;I think I stumbled onto the solution, partly due to the teddy bear principle, partly due to the answers from [ikegami], [toma]. and [quester].&lt;/p&gt;

&lt;p&gt;I think I was reading the documentation for vim a little incorrectly.  The docs state:&lt;/p&gt;
&lt;blockquote&gt;
-T {terminal}
            Tells  Vim  the  name  of the terminal you are using.  Only
            required when the automatic way doesn't work.  Should be  a
            terminal  known  to Vim (builtin) or defined in the termcap
            or terminfo file.
&lt;/blockquote&gt;
&lt;p&gt;Late last night I tried passing that argument with a known good termtype (xterm) and lo and behold, it worked!&lt;/p&gt;
&lt;p&gt;To bring this 'round back to the perlish solution (and in case anyone in the future runs into this), this is accomplished with the following modification:&lt;/p&gt;
&lt;c&gt;
  my $vim = Text::VimColor-&gt;new(
    string =&gt; $perl,
    vim_options =&gt; [ qw( -RXZ -i NONE -u NONE -N -T xterm ) ],
  );
&lt;/c&gt;
&lt;p&gt;(Where &lt;c&gt;qw( -RXZ -i NONE -u NONE -N )&lt;/c&gt; is the default for &lt;c&gt;vim_options&lt;/c&gt;, as according to [cpan::Text::VimColor]).
&lt;p&gt;And for the record, I'm using vim 7 - perhaps (inferring from [quester]'s reply) vim 7 handles the need for a terminal differently.&lt;/p&gt;


&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-474411"&gt;


&lt;br&gt;&lt;br&gt;
--chargrill
&lt;hr&gt;
&lt;font size=2&gt;
&lt;code&gt;
s**lil*;  $*=join'',sort split q**;  s;.*;grr; &amp;&amp;s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
&lt;/code&gt;
&lt;/font&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
605626</field>
<field name="parent_node">
605626</field>
</data>
</node>
