annotate runtime/syntax/phtml.vim @ 1086:1a511b7b69eb v7.0.212

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