225 lines · 16.7 KB · Text
RawDownload
" DTML syntax file" Language:			Zope's Dynamic Template Markup Language" Maintainer:	    Jean Jordaan <jean@upfrontsystems.co.za> (njj)" Last change:	    2001 Sep 02 " These are used with Claudio Fleiner's html.vim in the standard distribution."" Still very hackish. The 'dtml attributes' and 'dtml methods' have been" hacked out of the Zope Quick Reference in case someone finds something" sensible to do with them. I certainly haven't. " For version 5.x: Clear all syntax items" For version 6.x: Quit when a syntax file was already loadedif version < 600  syntax clearelseif exists("b:current_syntax")  finishendif " First load the HTML syntaxif version < 600  source <sfile>:p:h/html.vimelse  runtime! syntax/html.vimendif syn case match " This doesn't have any effect.  Does it need to be moved to above/" if !exists("main_syntax")"   let main_syntax = 'dtml'" endif " dtml attributessyn keyword dtmlAttribute ac_inherited_permissions access_debug_info containedsyn keyword dtmlAttribute acquiredRolesAreUsedBy all_meta_types assume_children AUTH_TYPE containedsyn keyword dtmlAttribute AUTHENTICATED_USER AUTHENTICATION_PATH BASE0 batch-end-index batch-size containedsyn keyword dtmlAttribute batch-start-index bobobase_modification_time boundary branches containedsyn keyword dtmlAttribute branches_expr capitalize cb_dataItems cb_dataValid cb_isCopyable containedsyn keyword dtmlAttribute cb_isMoveable changeClassId classDefinedAndInheritedPermissions containedsyn keyword dtmlAttribute classDefinedPermissions classInheritedPermissions collapse-all column containedsyn keyword dtmlAttribute connected connectionIsValid CONTENT_LENGTH CONTENT_TYPE cook cookies containedsyn keyword dtmlAttribute COPY count- createInObjectManager da_has_single_argument dav__allprop containedsyn keyword dtmlAttribute dav__init dav__propnames dav__propstat dav__validate default containedsyn keyword dtmlAttribute delClassAttr DELETE Destination DestinationURL digits discard containedsyn keyword dtmlAttribute disposition document_src e encode enter etc expand-all expr File containedsyn keyword dtmlAttribute filtered_manage_options filtered_meta_types first- fmt footer form containedsyn keyword dtmlAttribute GATEWAY_INTERFACE get_local_roles get_local_roles_for_userid containedsyn keyword dtmlAttribute get_request_var_or_attr get_size get_size get_valid_userids getAttribute containedsyn keyword dtmlAttribute getAttributeNode getAttributes getChildNodes getClassAttr getContentType containedsyn keyword dtmlAttribute getData getDocType getDocumentElement getElementsByTagName getFirstChild containedsyn keyword dtmlAttribute getImplementation getLastChild getLength getName getNextSibling containedsyn keyword dtmlAttribute getNodeName getNodeType getNodeValue getOwnerDocument getParentNode containedsyn keyword dtmlAttribute getPreviousSibling getProperty getPropertyType getSize getSize getSize containedsyn keyword dtmlAttribute get_size getTagName getUser getUserName getUserNames getUsers containedsyn keyword dtmlAttribute has_local_roles hasChildNodes hasProperty HEAD header hexdigits HTML containedsyn keyword dtmlAttribute html_quote HTMLFile id index_html index_objects indexes containedsyn keyword dtmlAttribute inheritedAttribute items last- leave leave_another leaves letters LOCK containedsyn keyword dtmlAttribute locked_in_version lower lowercase mailfrom mailhost mailhost_list mailto containedsyn keyword dtmlAttribute manage manage_ methods manage_access manage_acquiredPermissions containedsyn keyword dtmlAttribute manage_addConferaTopic manage_addDocument manage_addDTMLDocument containedsyn keyword dtmlAttribute manage_addDTMLMethod manage_addFile manage_addFolder manage_addImage containedsyn keyword dtmlAttribute manage_addLocalRoles manage_addMailHost manage_addPermission containedsyn keyword dtmlAttribute manage_addPrincipiaFactory manage_addProduct manage_addProperty containedsyn keyword dtmlAttribute manage_addUserFolder manage_addZClass manage_addZGadflyConnection containedsyn keyword dtmlAttribute manage_addZGadflyConnectionForm manage_advanced manage_afterAdd containedsyn keyword dtmlAttribute manage_afterClone manage_beforeDelete manage_changePermissions containedsyn keyword dtmlAttribute manage_changeProperties manage_clone manage_CopyContainerFirstItem containedsyn keyword dtmlAttribute manage_copyObjects manage_cutObjects manage_defined_roles containedsyn keyword dtmlAttribute manage_delLocalRoles manage_delObjects manage_delProperties containedsyn keyword dtmlAttribute manage_distribute manage_edit manage_editedDialog manage_editProperties containedsyn keyword dtmlAttribute manage_editRoles manage_exportObject manage_FTPget manage_FTPlist containedsyn keyword dtmlAttribute manage_FTPstat manage_get_product_readme__ manage_getPermissionMapping containedsyn keyword dtmlAttribute manage_haveProxy manage_help manage_importObject manage_listLocalRoles containedsyn keyword dtmlAttribute manage_options manage_pasteObjects manage_permission containedsyn keyword dtmlAttribute manage_propertiesForm manage_proxy manage_renameObject manage_role containedsyn keyword dtmlAttribute manage_setLocalRoles manage_setPermissionMapping containedsyn keyword dtmlAttribute manage_subclassableClassNames manage_test manage_testForm containedsyn keyword dtmlAttribute manage_undo_transactions manage_upload manage_users manage_workspace containedsyn keyword dtmlAttribute management_interface mapping math max- mean- median- meta_type min- containedsyn keyword dtmlAttribute MKCOL modified_in_version MOVE multiple name navigate_filter new_version containedsyn keyword dtmlAttribute newline_to_br next next-batches next-sequence next-sequence-end-index containedsyn keyword dtmlAttribute next-sequence-size next-sequence-start-index no manage_access None containedsyn keyword dtmlAttribute nonempty normalize nowrap null Object Manager objectIds objectItems containedsyn keyword dtmlAttribute objectMap objectValues octdigits only optional OPTIONS orphan overlap containedsyn keyword dtmlAttribute PARENTS PATH_INFO PATH_TRANSLATED permission_settings containedsyn keyword dtmlAttribute permissionMappingPossibleValues permissionsOfRole pi port containedsyn keyword dtmlAttribute possible_permissions previous previous-batches previous-sequence containedsyn keyword dtmlAttribute previous-sequence-end-index previous-sequence-size containedsyn keyword dtmlAttribute previous-sequence-start-index PrincipiaFind PrincipiaSearchSource containedsyn keyword dtmlAttribute propdict propertyIds propertyItems propertyLabel propertyMap propertyMap containedsyn keyword dtmlAttribute propertyValues PROPFIND PROPPATCH PUT query_day query_month QUERY_STRING containedsyn keyword dtmlAttribute query_year quoted_input quoted_report raise_standardErrorMessage random containedsyn keyword dtmlAttribute read read_raw REMOTE_ADDR REMOTE_HOST REMOTE_IDENT REMOTE_USER REQUEST containedsyn keyword dtmlAttribute REQUESTED_METHOD required RESPONSE reverse rolesOfPermission save schema containedsyn keyword dtmlAttribute SCRIPT_NAME sequence-end sequence-even sequence-index containedsyn keyword dtmlAttribute sequence-index-var- sequence-item sequence-key sequence-Letter containedsyn keyword dtmlAttribute sequence-letter sequence-number sequence-odd sequence-query containedsyn keyword dtmlAttribute sequence-roman sequence-Roman sequence-start sequence-step-end-index containedsyn keyword dtmlAttribute sequence-step-size sequence-step-start-index sequence-var- SERVER_NAME containedsyn keyword dtmlAttribute SERVER_PORT SERVER_PROTOCOL SERVER_SOFTWARE setClassAttr setName single containedsyn keyword dtmlAttribute size skip_unauthorized smtphost sort spacify sql_quote SQLConnectionIDs containedsyn keyword dtmlAttribute standard-deviation- standard-deviation-n- standard_html_footer containedsyn keyword dtmlAttribute standard_html_header start String string subject SubTemplate superValues containedsyn keyword dtmlAttribute tabs_path_info tag test_url_ text_content this thousands_commas title containedsyn keyword dtmlAttribute title_and_id title_or_id total- tpURL tpValues TRACE translate tree-c containedsyn keyword dtmlAttribute tree-colspan tree-e tree-item-expanded tree-item-url tree-level containedsyn keyword dtmlAttribute tree-root-url tree-s tree-state type undoable_transactions UNLOCK containedsyn keyword dtmlAttribute update_data upper uppercase url url_quote URLn user_names containedsyn keyword dtmlAttribute userdefined_roles valid_property_id valid_roles validate_roles containedsyn keyword dtmlAttribute validClipData validRoles values variance- variance-n- view_image_or_file containedsyn keyword dtmlAttribute where whitespace whrandom xml_namespace zclass_candidate_view_actions containedsyn keyword dtmlAttribute ZClassBaseClassNames ziconImage ZopeFind ZQueryIds contained syn keyword dtmlMethod abs absolute_url ac_inherited_permissions aCommon containedsyn keyword dtmlMethod aCommonZ acos acquiredRolesAreUsedBy aDay addPropertySheet aMonth AMPM containedsyn keyword dtmlMethod ampm AMPMMinutes appendChild appendData appendHeader asin atan atan2 containedsyn keyword dtmlMethod atof atoi betavariate capatilize capwords catalog_object ceil center containedsyn keyword dtmlMethod choice chr cloneNode COPY cos cosh count createInObjectManager containedsyn keyword dtmlMethod createSQLInput cunifvariate Date DateTime Day day dayOfYear dd default containedsyn keyword dtmlMethod DELETE deleteData delPropertySheet divmod document_id document_title dow containedsyn keyword dtmlMethod earliestTime enter equalTo exp expireCookie expovariate fabs fCommon containedsyn keyword dtmlMethod fCommonZ filtered_manage_options filtered_meta_types find float floor containedsyn keyword dtmlMethod fmod frexp gamma gauss get get_local_roles_for_userid get_size getattr containedsyn keyword dtmlMethod getAttribute getAttributeNode getClassAttr getDomains containedsyn keyword dtmlMethod getElementsByTagName getHeader getitem getNamedItem getobject containedsyn keyword dtmlMethod getObjectsInfo getpath getProperty getRoles getStatus getUser containedsyn keyword dtmlMethod getUserName greaterThan greaterThanEqualTo h_12 h_24 has_key containedsyn keyword dtmlMethod has_permission has_role hasattr hasFeature hash hasProperty HEAD hex containedsyn keyword dtmlMethod hour hypot index index_html inheritedAttribute insertBefore insertData containedsyn keyword dtmlMethod int isCurrentDay isCurrentHour isCurrentMinute isCurrentMonth containedsyn keyword dtmlMethod isCurrentYear isFuture isLeadYear isPast item join latestTime ldexp containedsyn keyword dtmlMethod leave leave_another len lessThan lessThanEqualTo ljust log log10 containedsyn keyword dtmlMethod lognormvariate lower lstrip maketrans manage manage_access containedsyn keyword dtmlMethod manage_acquiredPermissions manage_addColumn manage_addDocument containedsyn keyword dtmlMethod manage_addDTMLDocument manage_addDTMLMethod manage_addFile containedsyn keyword dtmlMethod manage_addFolder manage_addImage manage_addIndex manage_addLocalRoles containedsyn keyword dtmlMethod manage_addMailHost manage_addPermission manage_addPrincipiaFactory containedsyn keyword dtmlMethod manage_addProduct manage_addProperty manage_addPropertySheet containedsyn keyword dtmlMethod manage_addUserFolder manage_addZCatalog manage_addZClass containedsyn keyword dtmlMethod manage_addZGadflyConnection manage_addZGadflyConnectionForm containedsyn keyword dtmlMethod manage_advanced manage_catalogClear manage_catalogFoundItems containedsyn keyword dtmlMethod manage_catalogObject manage_catalogReindex manage_changePermissions containedsyn keyword dtmlMethod manage_changeProperties manage_clone manage_CopyContainerFirstItem containedsyn keyword dtmlMethod manage_copyObjects manage_createEditor manage_createView containedsyn keyword dtmlMethod manage_cutObjects manage_defined_roles manage_delColumns containedsyn keyword dtmlMethod manage_delIndexes manage_delLocalRoles manage_delObjects containedsyn keyword dtmlMethod manage_delProperties manage_Discard__draft__ manage_distribute containedsyn keyword dtmlMethod manage_edit manage_edit manage_editedDialog manage_editProperties containedsyn keyword dtmlMethod manage_editRoles manage_exportObject manage_importObject containedsyn keyword dtmlMethod manage_makeChanges manage_pasteObjects manage_permission containedsyn keyword dtmlMethod manage_propertiesForm manage_proxy manage_renameObject manage_role containedsyn keyword dtmlMethod manage_Save__draft__ manage_setLocalRoles manage_setPermissionMapping containedsyn keyword dtmlMethod manage_test manage_testForm manage_uncatalogObject containedsyn keyword dtmlMethod manage_undo_transactions manage_upload manage_users manage_workspace containedsyn keyword dtmlMethod mange_createWizard max min minute MKCOL mm modf month Month MOVE containedsyn keyword dtmlMethod namespace new_version nextObject normalvariate notEqualTo objectIds containedsyn keyword dtmlMethod objectItems objectValues oct OPTIONS ord paretovariate parts pCommon containedsyn keyword dtmlMethod pCommonZ pDay permissionsOfRole pMonth pow PreciseAMPM PreciseTime containedsyn keyword dtmlMethod previousObject propertyInfo propertyLabel PROPFIND PROPPATCH PUT quit containedsyn keyword dtmlMethod raise_standardErrorMessage randint random read read_raw redirect containedsyn keyword dtmlMethod removeAttribute removeAttributeNode removeChild replace replaceChild containedsyn keyword dtmlMethod replaceData rfc822 rfind rindex rjust rolesOfPermission round rstrip containedsyn keyword dtmlMethod save searchResults second seed set setAttribute setAttributeNode setBase containedsyn keyword dtmlMethod setCookie setHeader setStatus sin sinh split splitText sqrt str strip containedsyn keyword dtmlMethod substringData superValues swapcase tabs_path_info tan tanh Time containedsyn keyword dtmlMethod TimeMinutes timeTime timezone title title_and_id title_or_id toXML containedsyn keyword dtmlMethod toZone uncatalog_object undoable_transactions uniform uniqueValuesFor containedsyn keyword dtmlMethod update_data upper valid_property_id validate_roles vonmisesvariate containedsyn keyword dtmlMethod weibullvariate year yy zfill ZopeFind contained " DTML tagssyn keyword dtmlTagName var if elif else unless in with let call raise try except tag comment tree sqlvar sqltest sqlgroup sendmail mime transparent contained syn keyword dtmlEndTagName if unless in with let raise try tree sendmail transparent contained " Own additionssyn keyword dtmlTODO    TODO FIXME		contained syn region dtmlComment start=+<dtml-comment>+ end=+</dtml-comment>+ contains=dtmlTODO " All dtmlTagNames are contained by dtmlIsTag.syn match dtmlIsTag	    "dtml-[A-Za-z]\+"    contains=dtmlTagName " 'var' tag entity syntax: &dtml-variableName;"       - with attributes: &dtml.attribute1[.attribute2]...-variableName;syn match dtmlSpecialChar "&dtml[.0-9A-Za-z_]\{-}-[0-9A-Za-z_.]\+;" " Redefine to allow inclusion of DTML within HTML strings.syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreprocsyn region htmlLink start="<a\>[^>]*href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreprocsyn 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,@htmlPreprocsyn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreprocsyn region  htmlString   contained start=+"+ end=+"+ contains=dtmlSpecialChar,htmlSpecialChar,javaScriptExpression,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlPreprocsyn match   htmlTagN     contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameClustersyn match   htmlTagN     contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster " Define the default highlighting." For version 5.7 and earlier: only when not done already" For version 5.8 and later: only when an item doesn't have highlighting yetif version >= 508 || !exists("did_dtml_syntax_inits")  if version < 508    let did_dtml_syntax_inits = 1    command -nargs=+ HiLink hi link <args>  else    command -nargs=+ HiLink hi def link <args>  endif   HiLink dtmlIsTag			PreProc  HiLink dtmlAttribute		Identifier  HiLink dtmlMethod			Function  HiLink dtmlComment		Comment  HiLink dtmlTODO			Todo  HiLink dtmlSpecialChar    Special   delcommand HiLinkendif let b:current_syntax = "dtml" " if main_syntax == 'dtml'"   unlet main_syntax" endif " vim: ts=4