[Israel.pm] Perl syntax highlighting in Vim

Gaal Yahas gaal at forum2.org
Wed Aug 2 04:49:35 PDT 2006


On Wed, Aug 02, 2006 at 04:27:09AM -0700, Srikanth Madani wrote:
> I wonder if anyone has a .vimrc for vim which has
> syntax highlighting for Perl AND C.
> 
> If I can't have both, then just for Perl, please.

Huh? Vim has carried syntax files for both languages for years now. All
you need to do is ":setf perl". If a file doesn't autodetect its type
correctly, put a comment saying

  vim: filetype=perl :

(or c) somewhere. If you're looking for a Perl 6 syntax file, a decent
one is at

  http://svn.openfoundry.org/util/perl6.vim

If you're looking for a syntax file that handles embedded Perl inside c
or vice versa, I don't have a good answer for you except look at how the
Perl syntax has a mode for embedded POD.

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list