<?xml version="1.0" encoding="windows-1252"?>
<node id="270126" title="Re: Vim for PerlMonks nodes" created="2003-06-30 06:43:03" updated="2005-07-27 06:52:04">
<type id="11">
note</type>
<author id="118827">
zakb</author>
<data>
<field name="doctext">
&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; [gmax] says it works with colons, and it works for me; in fact, it works either way (with colons / without).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update2:&lt;/em&gt;The reason it fails for some is because recent versions of syntax/perl.vim check to see if b:current_syntax is defined, and if so exit.&lt;/p&gt;
&lt;p&gt;You need to put &lt;code&gt;unlet b:current_syntax&lt;/code&gt; before the &lt;code&gt;syntax include&lt;/code&gt; line.&lt;/p&gt;
&lt;br&gt;&lt;br&gt;


&lt;strike&gt;&lt;p&gt;I think the reason it's not working for some people is hat the syntax lines in step 3 should not be prefixed by colons ':'.&lt;/p&gt;
&lt;p&gt;Change:&lt;/p&gt;
&lt;code&gt;" add Perl extensions
:syntax include @Perl syntax/perl.vim
:syntax region htmlPerl start="&lt; code &gt;" end="&lt; /code &gt;" contains=@Perl keepend
" remove spaces around code tags !

let b:current_syntax = "html"

syntax region PMlink start="\[" end ="\]"&lt;/code&gt;
&lt;p&gt;To:&lt;/p&gt;
&lt;code&gt;" add Perl extensions
syntax include @Perl syntax/perl.vim
syntax region htmlPerl start="&lt; code &gt;" end="&lt; /code &gt;" contains=@Perl keepend
" remove spaces around code tags !

let b:current_syntax = "html"

syntax region PMlink start="\[" end ="\]"&lt;/code&gt;
&lt;p&gt;Not forgetting, of course, to remove the spaces.&lt;/p&gt;
&lt;/strike&gt;</field>
<field name="root_node">
270014</field>
<field name="parent_node">
270014</field>
</data>
</node>
