7
|
1 " Vim syntax file
|
|
2 " Language: PLP (Perl in HTML)
|
|
3 " Maintainer: Juerd <juerd@juerd.nl>
|
|
4 " Last Change: 2003 Apr 25
|
|
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 @PLPperl <sfile>:p:h/perl.vim
|
|
25 else
|
|
26 runtime! syntax/html.vim
|
|
27 unlet b:current_syntax
|
|
28 syn include @PLPperl syntax/perl.vim
|
|
29 endif
|
|
30
|
|
31 syn cluster htmlPreproc add=PLPperlblock
|
|
32
|
|
33 syn keyword perlControl PLP_END
|
|
34 syn keyword perlStatementInclude include Include
|
|
35 syn keyword perlStatementFiles ReadFile WriteFile Counter
|
|
36 syn keyword perlStatementScalar Entity AutoURL DecodeURI EncodeURI
|
|
37
|
|
38 syn cluster PLPperlcode contains=perlStatement.*,perlFunction,perlOperator,perlVarPlain,perlVarNotInMatches,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlControl,perlConditional,perlRepeat,perlComment,perlPOD,perlHereDoc,perlPackageDecl,perlElseIfError,perlFiledescRead,perlMatch
|
|
39
|
|
40 syn region PLPperlblock keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ transparent contains=@PLPperlcode
|
|
41
|
|
42 syn region PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+
|
|
43
|
|
44 let b:current_syntax = "plp"
|
|
45
|