restructure file locations
[perl/plp/.git] / plp.vim
1 " Vim syntax file
2 " Language:     PLP (Perl in HTML)
3 " Maintainer:   Shiar <perl@shiar.org>
4 " Last Change:  2002 May 20 
5 " Cloned From:  aspperl.vim
6 " Author:       Juerd <juerd@juerd.nl>
7
8 " Add to filetype.vim the following line (without quote sign):
9 " au BufNewFile,BufRead *.plp setf plp
10
11 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded
13 if version < 600
14   syntax clear
15 elseif exists("b:current_syntax")
16   finish
17 endif
18
19 if !exists("main_syntax")
20   let main_syntax = 'perlscript'
21 endif
22
23 if version < 600
24   so <sfile>:p:h/html.vim
25   syn include @PLPperl <sfile>:p:h/perl.vim
26 else
27   runtime! syntax/html.vim
28   unlet b:current_syntax
29   syn include @PLPperl syntax/perl.vim
30 endif
31
32 syn cluster htmlPreproc add=PLPperlblock
33
34 syn keyword perlControl PLP_END
35 syn keyword perlStatementInclude include Include
36 syn keyword perlStatementFiles ReadFile WriteFile Counter
37 syn keyword perlStatementScalar Entity AutoURL DecodeURI EncodeURI
38
39 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
40   
41 syn region  PLPperlblock keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ transparent contains=@PLPperlcode
42
43 syn region  PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+
44
45 let b:current_syntax = "plp"
46