annotate runtime/syntax/phtml.vim @ 27:a01d8d9b2a58 first-working-version

first working version.
author kono
date Mon, 27 Oct 2008 18:28:11 +0900
parents 76efa0be13f1
children e170173ecb68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: phtml PHP 2.0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Lutz Eymers <ixtab@polzin.com>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " URL: http://www.isp.de/data/phtml.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 " Email: Subject: send syntax_vim.tgz
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 " Last change: 2003 May 11
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 "
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 " Options phtml_sql_query = 1 for SQL syntax highligthing inside strings
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9 " phtml_minlines = x to sync at least x lines backwards
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 syntax clear
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 elseif exists("b:current_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 finish
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 if !exists("main_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 let main_syntax = 'phtml'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 so <sfile>:p:h/html.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 runtime! syntax/html.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 unlet b:current_syntax
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 syn cluster htmlPreproc add=phtmlRegionInsideHtmlTags
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 if exists( "phtml_sql_query")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 if phtml_sql_query == 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 syn include @phtmlSql <sfile>:p:h/sql.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 unlet b:current_syntax
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 syn cluster phtmlSql remove=sqlString,sqlComment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 syn case match
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 " Env Variables
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 syn keyword phtmlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 syn keyword phtmlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 syn keyword phtmlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 syn keyword phtmlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 syn keyword phtmlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 syn keyword phtmlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 syn keyword phtmlEnvVar HTTP_FROM HTTP_REFERER contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 syn keyword phtmlEnvVar PHP_SELF contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 syn case ignore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 " Internal Variables
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55 syn keyword phtmlIntVar phperrmsg php_self contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 " Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 syn region phtmlComment start="/\*" end="\*/" contained contains=phtmlTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 " Function names
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 syn keyword phtmlFunctions Abs Ada_Close Ada_Connect Ada_Exec Ada_FetchRow contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 syn keyword phtmlFunctions Ada_FieldName Ada_FieldNum Ada_FieldType contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 syn keyword phtmlFunctions Ada_FreeResult Ada_NumFields Ada_NumRows Ada_Result contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 syn keyword phtmlFunctions Ada_ResultAll AddSlashes ASort BinDec Ceil ChDir contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 syn keyword phtmlFunctions AdaGrp ChMod ChOwn Chop Chr ClearStack ClearStatCache contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 syn keyword phtmlFunctions closeDir CloseLog Cos Count Crypt Date dbList contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 syn keyword phtmlFunctions dbmClose dbmDelete dbmExists dbmFetch dbmFirstKey contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 syn keyword phtmlFunctions dbmInsert dbmNextKey dbmOpen dbmReplace DecBin DecHex contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 syn keyword phtmlFunctions DecOct doubleval Echo End ereg eregi ereg_replace contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 syn keyword phtmlFunctions eregi_replace EscapeShellCmd Eval Exec Exit Exp contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 syn keyword phtmlFunctions fclose feof fgets fgetss File fileAtime fileCtime contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 syn keyword phtmlFunctions fileGroup fileInode fileMtime fileOwner filePerms contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 syn keyword phtmlFunctions fileSize fileType Floor Flush fopen fputs FPassThru contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 syn keyword phtmlFunctions fseek fsockopen ftell getAccDir GetEnv getHostByName contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 syn keyword phtmlFunctions getHostByAddr GetImageSize getLastAcess contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 syn keyword phtmlFunctions getLastbrowser getLastEmail getLastHost getLastMod contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 syn keyword phtmlFunctions getLastref getLogDir getMyInode getMyPid getMyUid contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 syn keyword phtmlFunctions getRandMax getStartLogging getToday getTotal GetType contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 syn keyword phtmlFunctions gmDate Header HexDec HtmlSpecialChars ImageArc contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 syn keyword phtmlFunctions ImageChar ImageCharUp IamgeColorAllocate contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 syn keyword phtmlFunctions ImageColorTransparent ImageCopyResized ImageCreate contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 syn keyword phtmlFunctions ImageCreateFromGif ImageDestroy ImageFill contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 syn keyword phtmlFunctions ImageFilledPolygon ImageFilledRectangle contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 syn keyword phtmlFunctions ImageFillToBorder ImageGif ImageInterlace ImageLine contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 syn keyword phtmlFunctions ImagePolygon ImageRectangle ImageSetPixel contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 syn keyword phtmlFunctions ImageString ImageStringUp ImageSX ImageSY Include contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 syn keyword phtmlFunctions InitSyslog intval IsSet Key Link LinkInfo Log Log10 contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 syn keyword phtmlFunctions LosAs Mail Max Md5 mi_Close mi_Connect mi_DBname contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 syn keyword phtmlFunctions mi_Exec mi_FieldName mi_FieldNum mi_NumFields contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 syn keyword phtmlFunctions mi_NumRows mi_Result Microtime Min MkDir MkTime msql contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 syn keyword phtmlFunctions msql_connect msql_CreateDB msql_dbName msql_DropDB contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 syn keyword phtmlFunctions msqlFieldFlags msql_FieldLen msql_FieldName contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 syn keyword phtmlFunctions msql_FieldType msql_FreeResult msql_ListDBs contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94 syn keyword phtmlFunctions msql_Listfields msql_ListTables msql_NumFields contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 syn keyword phtmlFunctions msql_NumRows msql_RegCase msql_Result msql_TableName contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96 syn keyword phtmlFunctions mysql mysql_affected_rows mysql_close mysql_connect contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 syn keyword phtmlFunctions mysql_CreateDB mysql_dbName mysqlDropDB contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 syn keyword phtmlFunctions mysql_FieldFlags mysql_FieldLen mysql_FieldName contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99 syn keyword phtmlFunctions mysql_FieldType mysql_FreeResult mysql_insert_id contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100 syn keyword phtmlFunctions mysql_listDBs mysql_Listfields mysql_ListTables contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 syn keyword phtmlFunctions mysql_NumFields mysql_NumRows mysql_Result contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102 syn keyword phtmlFunctions mysql_TableName Next OctDec openDir OpenLog contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 syn keyword phtmlFunctions Ora_Bind Ora_Close Ora_Commit Ora_CommitOff contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104 syn keyword phtmlFunctions Ora_CommitOn Ora_Exec Ora_Fetch Ora_GetColumn contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105 syn keyword phtmlFunctions Ora_Logoff Ora_Logon Ora_Parse Ora_Rollback Ord contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 syn keyword phtmlFunctions Parse_str PassThru pclose pg_Close pg_Connect contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 syn keyword phtmlFunctions pg_DBname pg_ErrorMessage pg_Exec pg_FieldName contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108 syn keyword phtmlFunctions pg_FieldPrtLen pg_FieldNum pg_FieldSize contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 syn keyword phtmlFunctions pg_FieldType pg_FreeResult pg_GetLastOid pg_Host contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 syn keyword phtmlFunctions pg_NumFields pg_NumRows pg_Options pg_Port contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 syn keyword phtmlFunctions pg_Result pg_tty phpInfo phpVersion popen pos pow contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112 syn keyword phtmlFunctions Prev PutEnv QuoteMeta Rand readDir ReadFile ReadLink contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 syn keyword phtmlFunctions reg_Match reg_replace reg_Search Rename Reset return contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114 syn keyword phtmlFunctions rewind rewindDir RmDir rSort SetCookie SetErrorReporting contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115 syn keyword phtmlFunctions SetLogging SetShowInfo SetType shl shr Sin Sleep contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116 syn keyword phtmlFunctions Solid_Close Solid_Connect Solid_Exec Solid_FetchRow contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117 syn keyword phtmlFunctions Solid_FieldName Solid_FieldNum Solid_FreeResult contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 syn keyword phtmlFunctions Solid_NumFields Solid_NumRows Solid_Result Sort contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 syn keyword phtmlFunctions Spundtex Sprintf Sqrt Srand strchr strtr contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120 syn keyword phtmlFunctions StripSlashes strlen strchr strstr strtok strtolower contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 syn keyword phtmlFunctions strtoupper strval substr sybSQL_CheckConnect contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 syn keyword phtmlFunctions sybSQL_DBUSE sybSQL_Connect sybSQL_Exit contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123 syn keyword phtmlFunctions sybSQL_Fieldname sybSQL_GetField sybSQL_IsRow contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 syn keyword phtmlFunctions sybSQL_NextRow sybSQL_NumFields sybSQL_NumRows contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 syn keyword phtmlFunctions sybSQL_Query sybSQL_Result sybSQL_Result sybSQL_Seek contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126 syn keyword phtmlFunctions Symlink syslog System Tan TempNam Time Umask UniqId contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127 syn keyword phtmlFunctions Unlink Unset UrlDecode UrlEncode USleep Virtual contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 syn keyword phtmlFunctions SecureVar contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 " Conditional
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131 syn keyword phtmlConditional if else elseif endif switch endswitch contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133 " Repeat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134 syn keyword phtmlRepeat while endwhile contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 " Repeat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 syn keyword phtmlLabel case default contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139 " Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140 syn keyword phtmlStatement break return continue exit contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 " Operator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143 syn match phtmlOperator "[-=+%^&|*!]" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 syn match phtmlOperator "[-+*/%^&|]=" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145 syn match phtmlOperator "/[^*]"me=e-1 contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 syn match phtmlOperator "\$" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 syn match phtmlRelation "&&" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148 syn match phtmlRelation "||" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 syn match phtmlRelation "[!=<>]=" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150 syn match phtmlRelation "[<>]" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 " Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 syn match phtmlIdentifier "$\h\w*" contained contains=phtmlEnvVar,phtmlIntVar,phtmlOperator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 " Include
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 syn keyword phtmlInclude include contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 " Definesag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 syn keyword phtmlDefine Function contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162 " String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 syn region phtmlString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=phtmlIdentifier,phtmlSpecialChar,@phtmlSql contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165 " Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166 syn match phtmlNumber "-\=\<\d\+\>" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
167
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
168 " Float
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
169 syn match phtmlFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
170
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
171 " SpecialChar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
172 syn match phtmlSpecialChar "\\[abcfnrtyv\\]" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
173 syn match phtmlSpecialChar "\\\d\{3}" contained contains=phtmlOctalError
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
174 syn match phtmlSpecialChar "\\x[0-9a-fA-F]\{2}" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
175
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
176 syn match phtmlOctalError "[89]" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
177
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
178
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
179 syn match phtmlParentError "[)}\]]" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
180
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
181 " Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
182 syn keyword phtmlTodo TODO Todo todo contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
183
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
184 " Parents
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
185 syn cluster phtmlInside contains=phtmlComment,phtmlFunctions,phtmlIdentifier,phtmlConditional,phtmlRepeat,phtmlLabel,phtmlStatement,phtmlOperator,phtmlRelation,phtmlString,phtmlNumber,phtmlFloat,phtmlSpecialChar,phtmlParent,phtmlParentError,phtmlInclude
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
186
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
187 syn cluster phtmlTop contains=@phtmlInside,phtmlInclude,phtmlDefine,phtmlParentError,phtmlTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
188 syn region phtmlParent matchgroup=Delimiter start="(" end=")" contained contains=@phtmlInside
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
189 syn region phtmlParent matchgroup=Delimiter start="{" end="}" contained contains=@phtmlInside
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
190 syn region phtmlParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phtmlInside
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
191
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
192 syn region phtmlRegion keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|".\{-}>.\{-}"\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
193 syn region phtmlRegionInsideHtmlTags keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
194
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
195 " sync
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
196 if exists("phtml_minlines")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
197 exec "syn sync minlines=" . phtml_minlines
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
198 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
199 syn sync minlines=100
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
200 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
201
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
202 " Define the default highlighting.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
203 " For version 5.7 and earlier: only when not done already
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
204 " For version 5.8 and later: only when an item doesn't have highlighting yet
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
205 if version >= 508 || !exists("did_phtml_syn_inits")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
206 if version < 508
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
207 let did_phtml_syn_inits = 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
208 command -nargs=+ HiLink hi link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
209 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
210 command -nargs=+ HiLink hi def link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
211 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
212
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
213 HiLink phtmlComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
214 HiLink phtmlString String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
215 HiLink phtmlNumber Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
216 HiLink phtmlFloat Float
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
217 HiLink phtmlIdentifier Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
218 HiLink phtmlIntVar Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
219 HiLink phtmlEnvVar Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
220 HiLink phtmlFunctions Function
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
221 HiLink phtmlRepeat Repeat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
222 HiLink phtmlConditional Conditional
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
223 HiLink phtmlLabel Label
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
224 HiLink phtmlStatement Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
225 HiLink phtmlType Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
226 HiLink phtmlInclude Include
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
227 HiLink phtmlDefine Define
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
228 HiLink phtmlSpecialChar SpecialChar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
229 HiLink phtmlParentError Error
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
230 HiLink phtmlOctalError Error
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
231 HiLink phtmlTodo Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
232 HiLink phtmlOperator Operator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
233 HiLink phtmlRelation Operator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
234
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
235 delcommand HiLink
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
236 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
237
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
238 let b:current_syntax = "phtml"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
239
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
240 if main_syntax == 'phtml'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
241 unlet main_syntax
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
242 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
243
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
244 " vim: ts=8