I rely heavily upon vim's sytnax highlighting when coding. It has been
something of an annoyance to me while using Inline::C that everything after
the __DATA__ tag is the same colour.
I fixed it today, and thought I might share it with the list. Find perl.vim (
it lives in /usr/share/vim/vim63/syntax on my gentoo box ) and apply the
attached patch.
And then add this line to .vimrc:
let perl_inline_c = 1
This will cause the stuff underneath __C__ to use the C syntax highlighting.
It is still quite primitive, but it works well for me.
Mik
--- perl.old 2004-11-12 20:46:28.127150728 -0500
+++ perl.vim 2004-11-12 20:48:13.895071560 -0500
@@ -377,11 +377,19 @@
" __END__ and __DATA__ clauses
if exists("perl_fold")
- syntax region perlDATA start="^__\(DATA\|END\)__$" skip="."
end="." contains=perlPOD,@perlDATA fold
+ syntax region perlDATA start="^__\(DATA\|END\)__$" skip="."
end="." contains=perlPOD,@perlDATA,perlInline fold
else
- syntax region perlDATA start="^__\(DATA\|END\)__$" skip="."
end="." contains=perlPOD,@perlDATA
+ syntax region perlDATA start="^__\(DATA\|END\)__$" skip="."
end="." contains=perlPOD,@perlDATA,perlInline
endif
+if exists("perl_inline_c")
+ syn include @Inline syntax/c.vim
+ if exists("perl_fold")
+ syn region perlInline start="^__C__$" skip="." end="." [EMAIL PROTECTED]
fold
+ else
+ syn region perlInline start="^__C__$" skip="." end="." [EMAIL PROTECTED]
+ endif
+endif
"
" Folding