v3.13 release
[perl/plp/.git] / plp.vim
1 " Vim syntax file
2 " Language:     PLP (Perl in HTML)
3 " Maintainer:   Juerd <juerd@juerd.nl>
4 " Last Change:  2002 May 19
5 " Cloned From:  aspperl.vim
6
7 " Add to filetype.vim the following line (without quote sign):
8 " au BufNewFile,BufRead *.plp setf plp
9
10 " For version 5.x: Clear all syntax items
11 " For version 6.x: Quit when a syntax file was already loaded
12 if version < 600
13   syntax clear
14 elseif exists("b:current_syntax")
15   finish
16 endif
17
18 if !exists("main_syntax")
19   let main_syntax = 'perlscript'
20 endif
21
22 if version < 600
23   so <sfile>:p:h/html.vim
24   syn include @PLPPerlScript <sfile>:p:h/perl.vim
25 else
26   runtime! syntax/html.vim
27   unlet b:current_syntax
28   syn include @PLPPerlScript syntax/perl.vim
29 endif
30
31 syn cluster htmlPreproc add=PLPPerlScriptInsideHtmlTags
32
33 syn region  PLPPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ contains=@PLPPerlScript
34
35 syn cluster htmlPreproc add=PLPIncludeTag
36
37 syn region  PLPIncludeTag keepend matchgroup=Delimiter start=+<(+ end=+)>+ contains=@PLPIncludeFilename
38
39 let b:current_syntax = "plp"