codekingpro/portable-devtools
115k
1" DTML syntax file2" Language: Zope's Dynamic Template Markup Language3" Maintainer: Jean Jordaan <jean@upfrontsystems.co.za> (njj)4" Last change: 2001 Sep 025 6" These are used with Claudio Fleiner's html.vim in the standard distribution.7"8" Still very hackish. The 'dtml attributes' and 'dtml methods' have been9" hacked out of the Zope Quick Reference in case someone finds something10" sensible to do with them. I certainly haven't.11 12" quit when a syntax file was already loaded13if exists("b:current_syntax")14 finish15endif16 17" First load the HTML syntax18runtime! syntax/html.vim19 20syn case match21 22" This doesn't have any effect. Does it need to be moved to above/23" if !exists("main_syntax")24" let main_syntax = 'dtml'25" endif26 27" dtml attributes28syn keyword dtmlAttribute ac_inherited_permissions access_debug_info contained29syn keyword dtmlAttribute acquiredRolesAreUsedBy all_meta_types assume_children AUTH_TYPE contained30syn keyword dtmlAttribute AUTHENTICATED_USER AUTHENTICATION_PATH BASE0 batch-end-index batch-size contained31syn keyword dtmlAttribute batch-start-index bobobase_modification_time boundary branches contained32syn keyword dtmlAttribute branches_expr capitalize cb_dataItems cb_dataValid cb_isCopyable contained33syn keyword dtmlAttribute cb_isMoveable changeClassId classDefinedAndInheritedPermissions contained34syn keyword dtmlAttribute classDefinedPermissions classInheritedPermissions collapse-all column contained35syn keyword dtmlAttribute connected connectionIsValid CONTENT_LENGTH CONTENT_TYPE cook cookies contained36syn keyword dtmlAttribute COPY count- createInObjectManager da_has_single_argument dav__allprop contained37syn keyword dtmlAttribute dav__init dav__propnames dav__propstat dav__validate default contained38syn keyword dtmlAttribute delClassAttr DELETE Destination DestinationURL digits discard contained39syn keyword dtmlAttribute disposition document_src e encode enter etc expand-all expr File contained40syn keyword dtmlAttribute filtered_manage_options filtered_meta_types first- fmt footer form contained41syn keyword dtmlAttribute GATEWAY_INTERFACE get_local_roles get_local_roles_for_userid contained42syn keyword dtmlAttribute get_request_var_or_attr get_size get_size get_valid_userids getAttribute contained43syn keyword dtmlAttribute getAttributeNode getAttributes getChildNodes getClassAttr getContentType contained44syn keyword dtmlAttribute getData getDocType getDocumentElement getElementsByTagName getFirstChild contained45syn keyword dtmlAttribute getImplementation getLastChild getLength getName getNextSibling contained46syn keyword dtmlAttribute getNodeName getNodeType getNodeValue getOwnerDocument getParentNode contained47syn keyword dtmlAttribute getPreviousSibling getProperty getPropertyType getSize getSize getSize contained48syn keyword dtmlAttribute get_size getTagName getUser getUserName getUserNames getUsers contained49syn keyword dtmlAttribute has_local_roles hasChildNodes hasProperty HEAD header hexdigits HTML contained50syn keyword dtmlAttribute html_quote HTMLFile id index_html index_objects indexes contained51syn keyword dtmlAttribute inheritedAttribute items last- leave leave_another leaves letters LOCK contained52syn keyword dtmlAttribute locked_in_version lower lowercase mailfrom mailhost mailhost_list mailto contained53syn keyword dtmlAttribute manage manage_ methods manage_access manage_acquiredPermissions contained54syn keyword dtmlAttribute manage_addConferaTopic manage_addDocument manage_addDTMLDocument contained55syn keyword dtmlAttribute manage_addDTMLMethod manage_addFile manage_addFolder manage_addImage contained56syn keyword dtmlAttribute manage_addLocalRoles manage_addMailHost manage_addPermission contained57syn keyword dtmlAttribute manage_addPrincipiaFactory manage_addProduct manage_addProperty contained58syn keyword dtmlAttribute manage_addUserFolder manage_addZClass manage_addZGadflyConnection contained59syn keyword dtmlAttribute manage_addZGadflyConnectionForm manage_advanced manage_afterAdd contained60syn keyword dtmlAttribute manage_afterClone manage_beforeDelete manage_changePermissions contained61syn keyword dtmlAttribute manage_changeProperties manage_clone manage_CopyContainerFirstItem contained62syn keyword dtmlAttribute manage_copyObjects manage_cutObjects manage_defined_roles contained63syn keyword dtmlAttribute manage_delLocalRoles manage_delObjects manage_delProperties contained64syn keyword dtmlAttribute manage_distribute manage_edit manage_editedDialog manage_editProperties contained65syn keyword dtmlAttribute manage_editRoles manage_exportObject manage_FTPget manage_FTPlist contained66syn keyword dtmlAttribute manage_FTPstat manage_get_product_readme__ manage_getPermissionMapping contained67syn keyword dtmlAttribute manage_haveProxy manage_help manage_importObject manage_listLocalRoles contained68syn keyword dtmlAttribute manage_options manage_pasteObjects manage_permission contained69syn keyword dtmlAttribute manage_propertiesForm manage_proxy manage_renameObject manage_role contained70syn keyword dtmlAttribute manage_setLocalRoles manage_setPermissionMapping contained71syn keyword dtmlAttribute manage_subclassableClassNames manage_test manage_testForm contained72syn keyword dtmlAttribute manage_undo_transactions manage_upload manage_users manage_workspace contained73syn keyword dtmlAttribute management_interface mapping math max- mean- median- meta_type min- contained74syn keyword dtmlAttribute MKCOL modified_in_version MOVE multiple name navigate_filter new_version contained75syn keyword dtmlAttribute newline_to_br next next-batches next-sequence next-sequence-end-index contained76syn keyword dtmlAttribute next-sequence-size next-sequence-start-index no manage_access None contained77syn keyword dtmlAttribute nonempty normalize nowrap null Object Manager objectIds objectItems contained78syn keyword dtmlAttribute objectMap objectValues octdigits only optional OPTIONS orphan overlap contained79syn keyword dtmlAttribute PARENTS PATH_INFO PATH_TRANSLATED permission_settings contained80syn keyword dtmlAttribute permissionMappingPossibleValues permissionsOfRole pi port contained81syn keyword dtmlAttribute possible_permissions previous previous-batches previous-sequence contained82syn keyword dtmlAttribute previous-sequence-end-index previous-sequence-size contained83syn keyword dtmlAttribute previous-sequence-start-index PrincipiaFind PrincipiaSearchSource contained84syn keyword dtmlAttribute propdict propertyIds propertyItems propertyLabel propertyMap propertyMap contained85syn keyword dtmlAttribute propertyValues PROPFIND PROPPATCH PUT query_day query_month QUERY_STRING contained86syn keyword dtmlAttribute query_year quoted_input quoted_report raise_standardErrorMessage random contained87syn keyword dtmlAttribute read read_raw REMOTE_ADDR REMOTE_HOST REMOTE_IDENT REMOTE_USER REQUEST contained88syn keyword dtmlAttribute REQUESTED_METHOD required RESPONSE reverse rolesOfPermission save schema contained89syn keyword dtmlAttribute SCRIPT_NAME sequence-end sequence-even sequence-index contained90syn keyword dtmlAttribute sequence-index-var- sequence-item sequence-key sequence-Letter contained91syn keyword dtmlAttribute sequence-letter sequence-number sequence-odd sequence-query contained92syn keyword dtmlAttribute sequence-roman sequence-Roman sequence-start sequence-step-end-index contained93syn keyword dtmlAttribute sequence-step-size sequence-step-start-index sequence-var- SERVER_NAME contained94syn keyword dtmlAttribute SERVER_PORT SERVER_PROTOCOL SERVER_SOFTWARE setClassAttr setName single contained95syn keyword dtmlAttribute size skip_unauthorized smtphost sort spacify sql_quote SQLConnectionIDs contained96syn keyword dtmlAttribute standard-deviation- standard-deviation-n- standard_html_footer contained97syn keyword dtmlAttribute standard_html_header start String string subject SubTemplate superValues contained98syn keyword dtmlAttribute tabs_path_info tag test_url_ text_content this thousands_commas title contained99syn keyword dtmlAttribute title_and_id title_or_id total- tpURL tpValues TRACE translate tree-c contained100syn keyword dtmlAttribute tree-colspan tree-e tree-item-expanded tree-item-url tree-level contained101syn keyword dtmlAttribute tree-root-url tree-s tree-state type undoable_transactions UNLOCK contained102syn keyword dtmlAttribute update_data upper uppercase url url_quote URLn user_names contained103syn keyword dtmlAttribute userdefined_roles valid_property_id valid_roles validate_roles contained104syn keyword dtmlAttribute validClipData validRoles values variance- variance-n- view_image_or_file contained105syn keyword dtmlAttribute where whitespace whrandom xml_namespace zclass_candidate_view_actions contained106syn keyword dtmlAttribute ZClassBaseClassNames ziconImage ZopeFind ZQueryIds contained107 108syn keyword dtmlMethod abs absolute_url ac_inherited_permissions aCommon contained109syn keyword dtmlMethod aCommonZ acos acquiredRolesAreUsedBy aDay addPropertySheet aMonth AMPM contained110syn keyword dtmlMethod ampm AMPMMinutes appendChild appendData appendHeader asin atan atan2 contained111syn keyword dtmlMethod atof atoi betavariate capatilize capwords catalog_object ceil center contained112syn keyword dtmlMethod choice chr cloneNode COPY cos cosh count createInObjectManager contained113syn keyword dtmlMethod createSQLInput cunifvariate Date DateTime Day day dayOfYear dd default contained114syn keyword dtmlMethod DELETE deleteData delPropertySheet divmod document_id document_title dow contained115syn keyword dtmlMethod earliestTime enter equalTo exp expireCookie expovariate fabs fCommon contained116syn keyword dtmlMethod fCommonZ filtered_manage_options filtered_meta_types find float floor contained117syn keyword dtmlMethod fmod frexp gamma gauss get get_local_roles_for_userid get_size getattr contained118syn keyword dtmlMethod getAttribute getAttributeNode getClassAttr getDomains contained119syn keyword dtmlMethod getElementsByTagName getHeader getitem getNamedItem getobject contained120syn keyword dtmlMethod getObjectsInfo getpath getProperty getRoles getStatus getUser contained121syn keyword dtmlMethod getUserName greaterThan greaterThanEqualTo h_12 h_24 has_key contained122syn keyword dtmlMethod has_permission has_role hasattr hasFeature hash hasProperty HEAD hex contained123syn keyword dtmlMethod hour hypot index index_html inheritedAttribute insertBefore insertData contained124syn keyword dtmlMethod int isCurrentDay isCurrentHour isCurrentMinute isCurrentMonth contained125syn keyword dtmlMethod isCurrentYear isFuture isLeadYear isPast item join latestTime ldexp contained126syn keyword dtmlMethod leave leave_another len lessThan lessThanEqualTo ljust log log10 contained127syn keyword dtmlMethod lognormvariate lower lstrip maketrans manage manage_access contained128syn keyword dtmlMethod manage_acquiredPermissions manage_addColumn manage_addDocument contained129syn keyword dtmlMethod manage_addDTMLDocument manage_addDTMLMethod manage_addFile contained130syn keyword dtmlMethod manage_addFolder manage_addImage manage_addIndex manage_addLocalRoles contained131syn keyword dtmlMethod manage_addMailHost manage_addPermission manage_addPrincipiaFactory contained132syn keyword dtmlMethod manage_addProduct manage_addProperty manage_addPropertySheet contained133syn keyword dtmlMethod manage_addUserFolder manage_addZCatalog manage_addZClass contained134syn keyword dtmlMethod manage_addZGadflyConnection manage_addZGadflyConnectionForm contained135syn keyword dtmlMethod manage_advanced manage_catalogClear manage_catalogFoundItems contained136syn keyword dtmlMethod manage_catalogObject manage_catalogReindex manage_changePermissions contained137syn keyword dtmlMethod manage_changeProperties manage_clone manage_CopyContainerFirstItem contained138syn keyword dtmlMethod manage_copyObjects manage_createEditor manage_createView contained139syn keyword dtmlMethod manage_cutObjects manage_defined_roles manage_delColumns contained140syn keyword dtmlMethod manage_delIndexes manage_delLocalRoles manage_delObjects contained141syn keyword dtmlMethod manage_delProperties manage_Discard__draft__ manage_distribute contained142syn keyword dtmlMethod manage_edit manage_edit manage_editedDialog manage_editProperties contained143syn keyword dtmlMethod manage_editRoles manage_exportObject manage_importObject contained144syn keyword dtmlMethod manage_makeChanges manage_pasteObjects manage_permission contained145syn keyword dtmlMethod manage_propertiesForm manage_proxy manage_renameObject manage_role contained146syn keyword dtmlMethod manage_Save__draft__ manage_setLocalRoles manage_setPermissionMapping contained147syn keyword dtmlMethod manage_test manage_testForm manage_uncatalogObject contained148syn keyword dtmlMethod manage_undo_transactions manage_upload manage_users manage_workspace contained149syn keyword dtmlMethod mange_createWizard max min minute MKCOL mm modf month Month MOVE contained150syn keyword dtmlMethod namespace new_version nextObject normalvariate notEqualTo objectIds contained151syn keyword dtmlMethod objectItems objectValues oct OPTIONS ord paretovariate parts pCommon contained152syn keyword dtmlMethod pCommonZ pDay permissionsOfRole pMonth pow PreciseAMPM PreciseTime contained153syn keyword dtmlMethod previousObject propertyInfo propertyLabel PROPFIND PROPPATCH PUT quit contained154syn keyword dtmlMethod raise_standardErrorMessage randint random read read_raw redirect contained155syn keyword dtmlMethod removeAttribute removeAttributeNode removeChild replace replaceChild contained156syn keyword dtmlMethod replaceData rfc822 rfind rindex rjust rolesOfPermission round rstrip contained157syn keyword dtmlMethod save searchResults second seed set setAttribute setAttributeNode setBase contained158syn keyword dtmlMethod setCookie setHeader setStatus sin sinh split splitText sqrt str strip contained159syn keyword dtmlMethod substringData superValues swapcase tabs_path_info tan tanh Time contained160syn keyword dtmlMethod TimeMinutes timeTime timezone title title_and_id title_or_id toXML contained161syn keyword dtmlMethod toZone uncatalog_object undoable_transactions uniform uniqueValuesFor contained162syn keyword dtmlMethod update_data upper valid_property_id validate_roles vonmisesvariate contained163syn keyword dtmlMethod weibullvariate year yy zfill ZopeFind contained164 165" DTML tags166syn keyword dtmlTagName var if elif else unless in with let call raise try except tag comment tree sqlvar sqltest sqlgroup sendmail mime transparent contained167 168syn keyword dtmlEndTagName if unless in with let raise try tree sendmail transparent contained169 170" Own additions171syn keyword dtmlTODO TODO FIXME contained172 173syn region dtmlComment start=+<dtml-comment>+ end=+</dtml-comment>+ contains=dtmlTODO174 175" All dtmlTagNames are contained by dtmlIsTag.176syn match dtmlIsTag "dtml-[A-Za-z]\+" contains=dtmlTagName177 178" 'var' tag entity syntax: &dtml-variableName;179" - with attributes: &dtml.attribute1[.attribute2]...-variableName;180syn match dtmlSpecialChar "&dtml[.0-9A-Za-z_]\{-}-[0-9A-Za-z_.]\+;"181 182" Redefine to allow inclusion of DTML within HTML strings.183syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc184syn region htmlLink start="<a\>[^>]*href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc185syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc186syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc187syn region htmlString contained start=+"+ end=+"+ contains=dtmlSpecialChar,htmlSpecialChar,javaScriptExpression,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlPreproc188syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster189syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster190 191" Define the default highlighting.192" Only when an item doesn't have highlighting yet193 194hi def link dtmlIsTag PreProc195hi def link dtmlAttribute Identifier196hi def link dtmlMethod Function197hi def link dtmlComment Comment198hi def link dtmlTODO Todo199hi def link dtmlSpecialChar Special200 201 202let b:current_syntax = "dtml"203 204" if main_syntax == 'dtml'205" unlet main_syntax206" endif207 208" vim: ts=4209 