diff options
Diffstat (limited to 'runtime/syntax')
42 files changed, 3970 insertions, 2000 deletions
diff --git a/runtime/syntax/apachestyle.vim b/runtime/syntax/apachestyle.vim index 3695a11421..bd5c89d30f 100644 --- a/runtime/syntax/apachestyle.vim +++ b/runtime/syntax/apachestyle.vim @@ -1,8 +1,10 @@ " Vim syntax file " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) -" Maintainer: Christian Hammers <ch@westend.com> -" URL: none +" Maintainer: Ben RUBSON <ben.rubson@gmail.com> +" Former Maintainer: Christian Hammers <ch@westend.com> " ChangeLog: +" 2017-12-17,ch +" correctly detect comments " 2001-05-04,ch " adopted Vim 6.0 syntax style " 1999-10-28,ch @@ -27,8 +29,8 @@ endif syn case ignore -syn match apComment /^\s*#.*$/ syn match apOption /^\s*[^ \t#<=]*/ +syn match apComment /^\s*#.*$/ "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly " tags diff --git a/runtime/syntax/autodoc.vim b/runtime/syntax/autodoc.vim new file mode 100644 index 0000000000..67a627e46c --- /dev/null +++ b/runtime/syntax/autodoc.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: Autodoc +" Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Included by pike.vim, cmod.vim and optionally c.vim +" Remark: In order to make c.vim use it, set: c_autodoc + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +" A bunch of useful autodoc keywords +syn keyword autodocStatement contained appears belongs global +syn keyword autodocStatement contained decl directive inherit +syn keyword autodocStatement contained deprecated obsolete bugs +syn keyword autodocStatement contained copyright example fixme note param returns +syn keyword autodocStatement contained seealso thanks throws constant +syn keyword autodocStatement contained member index elem +syn keyword autodocStatement contained value type item + +syn keyword autodocRegion contained enum mapping code multiset array +syn keyword autodocRegion contained int string section mixed ol ul dl +syn keyword autodocRegion contained class module namespace +syn keyword autodocRegion contained endenum endmapping endcode endmultiset +syn keyword autodocRegion contained endarray endint endstring endsection +syn keyword autodocRegion contained endmixed endol endul enddl +syn keyword autodocRegion contained endclass endmodule endnamespace + +syn keyword autodocIgnore contained ignore endignore + +syn keyword autodocStatAcc contained b i u tt url pre sub sup +syn keyword autodocStatAcc contained ref rfc xml dl expr image + +syn keyword autodocTodo contained TODO FIXME XXX + +syn match autodocLineStart display "\(//\|/\?\*\)\@2<=!" +syn match autodocWords "[^!@{}[\]]\+" display contains=@Spell + +syn match autodocLink "@\[[^[\]]\+]"hs=s+2,he=e-1 display contains=autodocLead +syn match autodocAtStmt "@[a-z]\+\%(\s\|$\)\@="hs=s+1 display contains=autodocStatement,autodocIgnore,autodocLead,autodocRegion + +" Due to limitations of the matching algorithm, we cannot highlight +" nested autodocNStmtAcc structures correctly +syn region autodocNStmtAcc start="@[a-z]\+{" end="@}" contains=autodocStatAcc,autodocLead keepend + +syn match autodocUrl contained display ".\+" +syn region autodocAtUrlAcc start="{"ms=s+1 end="@}"he=e-1,me=e-2 contained display contains=autodocUrl,autodocLead keepend +syn region autodocNUrlAcc start="@url{" end="@}" contains=autodocStatAcc,autodocAtUrlAcc,autodocLead transparent + +syn match autodocSpecial "@@" display +syn match autodocLead "@" display contained + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match autodocSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match autodocSpaceError display " \+\t"me=e-1 + endif +endif + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment autodocComment minlines=" . b:c_minlines + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link autodocStatement Statement +hi def link autodocStatAcc Statement +hi def link autodocRegion Structure +hi def link autodocAtStmt Error +hi def link autodocNStmtAcc Identifier +hi def link autodocLink Type +hi def link autodocTodo Todo +hi def link autodocSpaceError Error +hi def link autodocLineStart SpecialComment +hi def link autodocSpecial SpecialChar +hi def link autodocUrl Underlined +hi def link autodocLead Statement +hi def link autodocIgnore Delimiter + +let b:current_syntax = "autodoc" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index f659a87b71..1143ca7dd7 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -13,6 +13,14 @@ set cpo&vim let s:ft = matchstr(&ft, '^\([^.]\)\+') +" Optional embedded Autodoc parsing +" To enable it add: let g:c_autodoc = 1 +" to your .vimrc +if exists("c_autodoc") + syn include @cAutodoc <sfile>:p:h/autodoc.vim + unlet b:current_syntax +endif + " A bunch of useful C keywords syn keyword cStatement goto break return continue asm syn keyword cLabel case default @@ -377,6 +385,13 @@ syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInP syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +" Optional embedded Autodoc parsing +if exists("c_autodoc") + syn match cAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cAutodocReal + syn cluster cPreProcGroup add=cAutodocReal +endif + " Highlight User Labels syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString if s:ft ==# 'c' || exists("cpp_no_cpp11") diff --git a/runtime/syntax/cabal.vim b/runtime/syntax/cabal.vim index 6641294a31..8af47d4042 100644 --- a/runtime/syntax/cabal.vim +++ b/runtime/syntax/cabal.vim @@ -1,8 +1,22 @@ " Vim syntax file -" Language: Haskell Cabal Build file -" Maintainer: Vincent Berthoux <twinside@gmail.com> -" File Types: .cabal -" Last Change: 2010 May 18 +" Language: Haskell Cabal Build file +" Author: Vincent Berthoux <twinside@gmail.com> +" Maintainer: Marcin Szamotulski <profunctor@pm.me> +" Previous Maintainer: Vincent Berthoux <twinside@gmail.com> +" File Types: .cabal +" Last Change: 15 May 2018 +" v1.5: Incorporated changes from +" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim +" Use `syn keyword` instead of `syn match`. +" Added cabalStatementRegion to limit matches of keywords, which fixes +" the highlighting of description's value. +" Added cabalVersionRegion to limit the scope of cabalVersionOperator +" and cabalVersion matches. +" Added cabalLanguage keyword. +" Added calbalTitle, cabalAuthor and cabalMaintainer syntax groups. +" Added ! and ^>= operators (calbal 2.0) +" Added build-type keywords +" v1.4: Add benchmark support, thanks to Simon Meier " v1.3: Updated to the last version of cabal " Added more highlighting for cabal function, true/false " and version number. Also added missing comment highlighting. @@ -23,97 +37,205 @@ if exists("b:current_syntax") finish endif -syn keyword cabalCategory Library library Executable executable Flag flag -syn keyword cabalCategory source-repository Source-Repository - -syn keyword cabalConditional if else -syn match cabalOperator "&&\|||\|!\|==\|>=\|<=" -syn keyword cabalFunction os arche impl flag -syn match cabalComment /--.*$/ -syn match cabalVersion "\d\+\(.\(\d\)\+\)\+" - -syn match cabalTruth "\ctrue" -syn match cabalTruth "\cfalse" - -syn match cabalCompiler "\cghc" -syn match cabalCompiler "\cnhc" -syn match cabalCompiler "\cyhc" -syn match cabalCompiler "\chugs" -syn match cabalCompiler "\chbc" -syn match cabalCompiler "\chelium" -syn match cabalCompiler "\cjhc" -syn match cabalCompiler "\clhc" - - -syn match cabalStatement "\cauthor" -syn match cabalStatement "\cbranch" -syn match cabalStatement "\cbug-reports" -syn match cabalStatement "\cbuild-depends" -syn match cabalStatement "\cbuild-tools" -syn match cabalStatement "\cbuild-type" -syn match cabalStatement "\cbuildable" -syn match cabalStatement "\cc-sources" -syn match cabalStatement "\ccabal-version" -syn match cabalStatement "\ccategory" -syn match cabalStatement "\ccc-options" -syn match cabalStatement "\ccopyright" -syn match cabalStatement "\ccpp-options" -syn match cabalStatement "\cdata-dir" -syn match cabalStatement "\cdata-files" -syn match cabalStatement "\cdefault" -syn match cabalStatement "\cdescription" -syn match cabalStatement "\cexecutable" -syn match cabalStatement "\cexposed-modules" -syn match cabalStatement "\cexposed" -syn match cabalStatement "\cextensions" -syn match cabalStatement "\cextra-lib-dirs" -syn match cabalStatement "\cextra-libraries" -syn match cabalStatement "\cextra-source-files" -syn match cabalStatement "\cextra-tmp-files" -syn match cabalStatement "\cfor example" -syn match cabalStatement "\cframeworks" -syn match cabalStatement "\cghc-options" -syn match cabalStatement "\cghc-prof-options" -syn match cabalStatement "\cghc-shared-options" -syn match cabalStatement "\chomepage" -syn match cabalStatement "\chs-source-dirs" -syn match cabalStatement "\chugs-options" -syn match cabalStatement "\cinclude-dirs" -syn match cabalStatement "\cincludes" -syn match cabalStatement "\cinstall-includes" -syn match cabalStatement "\cld-options" -syn match cabalStatement "\clicense-file" -syn match cabalStatement "\clicense" -syn match cabalStatement "\clocation" -syn match cabalStatement "\cmain-is" -syn match cabalStatement "\cmaintainer" -syn match cabalStatement "\cmodule" -syn match cabalStatement "\cname" -syn match cabalStatement "\cnhc98-options" -syn match cabalStatement "\cother-modules" -syn match cabalStatement "\cpackage-url" -syn match cabalStatement "\cpkgconfig-depends" -syn match cabalStatement "\cstability" -syn match cabalStatement "\csubdir" -syn match cabalStatement "\csynopsis" -syn match cabalStatement "\ctag" -syn match cabalStatement "\ctested-with" -syn match cabalStatement "\ctype" -syn match cabalStatement "\cversion" +" this file uses line continuation +let s:cpo_save = &cpo +set cpo&vim + +" set iskeyword for this syntax script +syn iskeyword @,48-57,192-255,- + +" Case sensitive matches +syn case match + +syn keyword cabalConditional if else +syn keyword cabalFunction os arche impl flag +syn match cabalComment /--.*$/ + +" Case insensitive matches +syn case ignore + +syn keyword cabalCategory contained + \ executable + \ library + \ benchmark + \ test-suite + \ source-repository + \ flag + \ custom-setup +syn match cabalCategoryTitle contained /[^{]*\ze{\?/ +syn match cabalCategoryRegion + \ contains=cabalCategory,cabalCategoryTitle + \ nextgroup=cabalCategory skipwhite + \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/ +syn keyword cabalTruth true false + +" cabalStatementRegion which limits the scope of cabalStatement keywords, this +" way they are not highlighted in description. +syn region cabalStatementRegion start=+^\s*\(--\)\@<!\k\+\s*:+ end=+:+ +syn keyword cabalStatement contained containedin=cabalStatementRegion + \ default-language + \ default-extensions + \ author + \ branch + \ bug-reports + \ build-depends + \ build-tools + \ build-type + \ buildable + \ c-sources + \ cabal-version + \ category + \ cc-options + \ copyright + \ cpp-options + \ data-dir + \ data-files + \ default + \ description + \ executable + \ exposed-modules + \ exposed + \ extensions + \ extra-tmp-files + \ extra-doc-files + \ extra-lib-dirs + \ extra-libraries + \ extra-source-files + \ exta-tmp-files + \ for example + \ frameworks + \ ghc-options + \ ghc-prof-options + \ ghc-shared-options + \ homepage + \ hs-source-dirs + \ hugs-options + \ include-dirs + \ includes + \ install-includes + \ ld-options + \ license + \ license-file + \ location + \ main-is + \ maintainer + \ manual + \ module + \ name + \ nhc98-options + \ other-extensions + \ other-modules + \ package-url + \ pkgconfig-depends + \ setup-depends + \ stability + \ subdir + \ synopsis + \ tag + \ tested-with + \ type + \ version + \ virtual-modules + +" operators and version operators +syn match cabalOperator /&&\|||\|!/ +syn match cabalVersionOperator contained + \ /!\|==\|\^\?>=\|<=\|<\|>/ +" match version: `[%]\@<!` is to exclude `%20` in http addresses. +syn match cabalVersion contained + \ /[%$_-]\@<!\<\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ +" cabalVersionRegion which limits the scope of cabalVersion pattern. +syn match cabalVersionRegionA + \ contains=cabalVersionOperator,cabalVersion + \ keepend + \ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ +" version inside `version: ...` +syn match cabalVersionRegionB + \ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion + \ /^\s*\%(cabal-\)\?version\s*:.*$/ + +syn keyword cabalLanguage Haskell98 Haskell2010 + +" title region +syn match cabalName contained /:\@<=.*/ +syn match cabalNameRegion + \ contains=cabalStatementRegion,cabalName + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*name\s*:.*$/ + +" author region +syn match cabalAuthor contained /:\@<=.*/ +syn match cabalAuthorRegion + \ contains=cabalStatementRegion,cabalStatement,cabalAuthor + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*author\s*:.*$/ + +" maintainer region +syn match cabalMaintainer contained /:\@<=.*/ +syn match cabalMaintainerRegion + \ contains=cabalStatementRegion,cabalStatement,cabalMaintainer + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*maintainer\s*:.*$/ + +" license region +syn match cabalLicense contained /:\@<=.*/ +syn match cabalLicenseRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicense + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license\s*:.*$/ + +" license-file region +syn match cabalLicenseFile contained /:\@<=.*/ +syn match cabalLicenseFileRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license-file\s*:.*$/ + +" tested-with region with compilers and versions +syn keyword cabalCompiler contained ghc nhc yhc hugs hbc helium jhc lhc +syn match cabalTestedWithRegion + \ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*tested-with\s*:.*$/ + +" build type keywords +syn keyword cabalBuildType contained + \ simple custom configure +syn match cabalBuildTypeRegion + \ contains=cabalStatementRegion,cabalStatement,cabalBuildType + \ nextgroup=cabalStatementRegion + \ /^\c\s*build-type\s*:.*$/ " Define the default highlighting. " Only when an item doesn't have highlighting yet - -hi def link cabalVersion Number -hi def link cabalTruth Boolean -hi def link cabalComment Comment -hi def link cabalStatement Statement -hi def link cabalCategory Type -hi def link cabalFunction Function -hi def link cabalConditional Conditional -hi def link cabalOperator Operator -hi def link cabalCompiler Constant +hi def link cabalName Title +hi def link cabalAuthor Normal +hi def link cabalMaintainer Normal +hi def link cabalCategoryTitle Title +hi def link cabalLicense Normal +hi def link cabalLicenseFile Normal +hi def link cabalBuildType Keyword +hi def link cabalVersion Number +hi def link cabalTruth Boolean +hi def link cabalComment Comment +hi def link cabalStatement Statement +hi def link cabalLanguage Type +hi def link cabalCategory Type +hi def link cabalFunction Function +hi def link cabalConditional Conditional +hi def link cabalOperator Operator +hi def link cabalVersionOperator Operator +hi def link cabalCompiler Constant let b:current_syntax = "cabal" +let &cpo = s:cpo_save +unlet! s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/chicken.vim b/runtime/syntax/chicken.vim new file mode 100644 index 0000000000..c3f949f823 --- /dev/null +++ b/runtime/syntax/chicken.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: Scheme (CHICKEN) +" Last Change: 2018-02-05 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" URL: https://foldling.org/vim/syntax/chicken.vim +" Notes: This is supplemental syntax, to be loaded after the core Scheme +" syntax file (syntax/scheme.vim). Enable it by setting b:is_chicken=1 +" and filetype=scheme. + +" Only to be used on top of the Scheme syntax. +if !exists('b:did_scheme_syntax') + finish +endif + +" Lighten parentheses. +hi! def link schemeParentheses Comment + +" foo#bar +syn match schemeExtraSyntax /[^ #'`\t\n()\[\]"|;]\+#[^ '`\t\n()\[\]"|;]\+/ + +" ##foo#bar +syn match schemeExtraSyntax /##[^ '`\t\n()\[\]"|;]\+/ + +" Heredocs. +syn region schemeString start=/#<[<#]\s*\z(.*\)/ end=/^\z1$/ + +" Keywords. +syn match schemeKeyword /#[!:][a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+/ +syn match schemeKeyword /[a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+:\>/ + +" C/C++ syntax. +let s:c = globpath(&rtp, 'syntax/cpp.vim', 0, 1) +if len(s:c) + exe 'syn include @c ' s:c[0] + syn region c matchgroup=schemeComment start=/#>/ end=/<#/ contains=@c +endif + +syn keyword schemeSyntax define-record + +syn keyword schemeLibrarySyntax declare +syn keyword schemeLibrarySyntax module +syn keyword schemeLibrarySyntax reexport +syn keyword schemeLibrarySyntax require-library + +syn keyword schemeTypeSyntax --> +syn keyword schemeTypeSyntax -> +syn keyword schemeTypeSyntax : +syn keyword schemeTypeSyntax assume +syn keyword schemeTypeSyntax compiler-typecase +syn keyword schemeTypeSyntax define-specialization +syn keyword schemeTypeSyntax define-type +syn keyword schemeTypeSyntax the + +syn keyword schemeExtraSyntax and-let* +syn keyword schemeExtraSyntax match +syn keyword schemeExtraSyntax match-lambda +syn keyword schemeExtraSyntax match-lambda* + +syn keyword schemeSpecialSyntax define-compiler-syntax +syn keyword schemeSpecialSyntax define-constant +syn keyword schemeSpecialSyntax define-external +syn keyword schemeSpecialSyntax define-inline +syn keyword schemeSpecialSyntax foreign-code +syn keyword schemeSpecialSyntax foreign-declare +syn keyword schemeSpecialSyntax foreign-lambda +syn keyword schemeSpecialSyntax foreign-lambda* +syn keyword schemeSpecialSyntax foreign-primitive +syn keyword schemeSpecialSyntax foreign-safe-lambda +syn keyword schemeSpecialSyntax foreign-safe-lambda* +syn keyword schemeSpecialSyntax foreign-value + +syn keyword schemeSyntaxSyntax begin-for-syntax +syn keyword schemeSyntaxSyntax define-for-syntax +syn keyword schemeSyntaxSyntax er-macro-transformer +syn keyword schemeSyntaxSyntax ir-macro-transformer +syn keyword schemeSyntaxSyntax require-library-for-syntax diff --git a/runtime/syntax/cmod.vim b/runtime/syntax/cmod.vim new file mode 100644 index 0000000000..ea37682ff6 --- /dev/null +++ b/runtime/syntax/cmod.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" Language: Cmod +" Current Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Is used to edit Cmod files for Pike development. +" Remark: Includes a highlighter for any embedded Autodoc format. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +if !exists("c_autodoc") + " For embedded Autodoc documentation + syn include @cmodAutodoc <sfile>:p:h/autodoc.vim + unlet b:current_syntax +endif + +" Supports rotating amongst several same-level preprocessor conditionals +packadd! matchit +let b:match_words = "({:}\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" + +" Cmod extensions +syn keyword cmodStatement __INIT INIT EXIT GC_RECURSE GC_CHECK +syn keyword cmodStatement EXTRA OPTIMIZE RETURN +syn keyword cmodStatement ADD_EFUN ADD_EFUN2 ADD_FUNCTION +syn keyword cmodStatement MK_STRING MK_STRING_SVALUE CONSTANT_STRLEN + +syn keyword cmodStatement SET_SVAL pop_n_elems pop_stack +syn keyword cmodStatement SIMPLE_ARG_TYPE_ERROR Pike_sp Pike_fp MKPCHARP +syn keyword cmodStatement SET_SVAL_TYPE REF_MAKE_CONST_STRING INC_PCHARP +syn keyword cmodStatement PTR_FROM_INT INHERIT_FROM_PTR +syn keyword cmodStatement DECLARE_CYCLIC BEGIN_CYCLIC END_CYCLIC +syn keyword cmodStatement UPDATE_LOCATION UNSAFE_IS_ZERO SAFE_IS_ZERO +syn keyword cmodStatement MKPCHARP_STR APPLY_MASTER current_storage +syn keyword cmodStatement PIKE_MAP_VARIABLE size_shift +syn keyword cmodStatement THREADS_ALLOW THREADS_DISALLOW + +syn keyword cmodStatement add_integer_constant ref_push_object +syn keyword cmodStatement push_string apply_svalue free_svalue +syn keyword cmodStatement get_inherit_storage get_storage +syn keyword cmodStatement make_shared_binary_string push_int64 +syn keyword cmodStatement begin_shared_string end_shared_string +syn keyword cmodStatement add_ref fast_clone_object clone_object +syn keyword cmodStatement push_undefined push_int ref_push_string +syn keyword cmodStatement free_string push_ulongest free_object +syn keyword cmodStatement convert_stack_top_to_bignum push_array +syn keyword cmodStatement push_object reduce_stack_top_bignum +syn keyword cmodStatement push_static_text apply_current +syn keyword cmodStatement assign_svalue free_program destruct_object +syn keyword cmodStatement start_new_program low_inherit stack_swap +syn keyword cmodStatement generic_error_program end_program +syn keyword cmodStatement free_array apply_external copy_mapping +syn keyword cmodStatement push_constant_text ref_push_mapping +syn keyword cmodStatement mapping_insert mapping_string_insert_string +syn keyword cmodStatement f_aggregate_mapping f_aggregate apply +syn keyword cmodStatement push_mapping push_svalue low_mapping_lookup +syn keyword cmodStatement assign_svalues_no_free f_add +syn keyword cmodStatement push_empty_string stack_dup assign_lvalue +syn keyword cmodStatement low_mapping_string_lookup allocate_mapping +syn keyword cmodStatement copy_shared_string make_shared_binary_string0 +syn keyword cmodStatement f_call_function f_index f_utf8_to_string +syn keyword cmodStatement finish_string_builder init_string_builder +syn keyword cmodStatement reset_string_builder free_string_builder +syn keyword cmodStatement string_builder_putchar get_all_args +syn keyword cmodStatement add_shared_strings check_all_args +syn keyword cmodStatement do_inherit add_string_constant +syn keyword cmodStatement add_program_constant set_init_callback +syn keyword cmodStatement simple_mapping_string_lookup +syn keyword cmodStatement f_sprintf push_text string_has_null +syn keyword cmodStatement end_and_resize_shared_string + +syn keyword cmodStatement args sp + +syn keyword cmodStatement free + +syn keyword cmodConstant ID_PROTECTED ID_FINAL PIKE_DEBUG +syn keyword cmodConstant NUMBER_NUMBER +syn keyword cmodConstant PIKE_T_INT PIKE_T_STRING PIKE_T_ARRAY +syn keyword cmodConstant PIKE_T_MULTISET PIKE_T_OBJECT PIKE_T_MAPPING +syn keyword cmodConstant NUMBER_UNDEFINED PIKE_T_PROGRAM PIKE_T_FUNCTION +syn keyword cmodConstant T_OBJECT T_STRING T_ARRAY T_MAPPING + +syn keyword cmodException SET_ONERROR UNSET_ONERROR ONERROR +syn keyword cmodException CALL_AND_UNSET_ONERROR + +syn keyword cmodDebug Pike_fatal Pike_error check_stack + +syn keyword cmodAccess public protected private INHERIT +syn keyword cmodAccess CTYPE CVAR PIKEVAR PIKEFUN + +syn keyword cmodModifier efun export flags optflags optfunc +syn keyword cmodModifier type rawtype errname name c_name prototype +syn keyword cmodModifier program_flags gc_trivial PMOD_EXPORT +syn keyword cmodModifier ATTRIBUTE noclone noinline +syn keyword cmodModifier tOr tFuncV tInt tMix tVoid tStr tMap tPrg +syn keyword cmodModifier tSetvar tArr tMult tMultiset +syn keyword cmodModifier tArray tMapping tString tSetvar tVar + +syn keyword cmodType bool mapping string multiset array mixed +syn keyword cmodType object function program auto svalue +syn keyword cmodType bignum longest zero pike_string +syn keyword cmodType this this_program THIS INT_TYPE INT64 INT32 +syn keyword cmodType p_wchar2 PCHARP p_wchar1 p_wchar0 MP_INT + +syn keyword cmodOperator _destruct create __hash _sizeof _indices _values +syn keyword cmodOperator _is_type _sprintf _equal _m_delete _get_iterator +syn keyword cmodOperator _search _types _serialize _deserialize +syn keyword cmodOperator _size_object _random _sqrt TYPEOF SUBTYPEOF +syn keyword cmodOperator LIKELY UNLIKELY + +syn keyword cmodStructure DECLARATIONS PIKECLASS DECLARE_STORAGE + +if !exists("c_autodoc") + syn match cmodAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cmodAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cmodAutodocReal + syn cluster cPreProcGroup add=cmodAutodocReal +endif + +" Default highlighting +hi def link cmodAccess Statement +hi def link cmodOperator Operator +hi def link cmodStatement Statement +hi def link cmodConstant Constant +hi def link cmodModifier Type +hi def link cmodType Type +hi def link cmodStorageClass StorageClass +hi def link cmodStructure Structure +hi def link cmodException Exception +hi def link cmodDebug Debug + +let b:current_syntax = "cmod" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim index c6d4e6b363..3636ed4130 100644 --- a/runtime/syntax/config.vim +++ b/runtime/syntax/config.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: configure.in script: M4 with sh -" Maintainer: Christian Hammesr <ch@lathspell.westend.com> -" Last Change: 2015 Jan 14 +" Former Maintainer: Christian Hammesr <ch@lathspell.westend.com> +" Last Change: 2018 Feb 03 " (patch from Yngve Inntjore Levinsen to detect AC_MSG) " (patch from Khym Chanur to add @Spell) +" (patch from James McCoy to fix paren matching) " Well, I actually even do not know much about m4. This explains why there " is probably very much missing here, yet ! @@ -30,8 +31,8 @@ syn keyword configspecial cat rm eval syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. -syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell -syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell " Define the default highlighting. " Only when an item doesn't have highlighting yet @@ -45,6 +46,7 @@ hi def link confignumber Number hi def link configkeyword Keyword hi def link configspecial Special hi def link configstring String +hi def link configmsg String let b:current_syntax = "config" diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim index 0443a1ff3d..116afe0b72 100644 --- a/runtime/syntax/cs.vim +++ b/runtime/syntax/cs.vim @@ -1,10 +1,12 @@ " Vim syntax file -" Language: C# -" Maintainer: Anduin Withers <awithers@anduin.com> -" Former Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: Fri Aug 14 13:56:37 PDT 2009 -" Filenames: *.cs -" $Id: cs.vim,v 1.4 2006/05/03 21:20:02 vimboss Exp $ +" Language: C# +" Maintainer: Nick Jensen <nickspoon@gmail.com> +" Former Maintainers: Anduin Withers <awithers@anduin.com> +" Johannes Zellner <johannes@zellner.org> +" Last Change: 2018-06-29 +" Filenames: *.cs +" License: Vim (see :h license) +" Repository: https://github.com/nickspoons/vim-cs " " REFERENCES: " [1] ECMA TC39: C# Language Specification (WD13Oct01.doc) @@ -17,136 +19,190 @@ let s:cs_cpo_save = &cpo set cpo&vim -" type -syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void -" storage -syn keyword csStorage class delegate enum interface namespace struct -" repeat / condition / label -syn keyword csRepeat break continue do for foreach goto return while -syn keyword csConditional else if switch -syn keyword csLabel case default +syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic +syn keyword csStorage delegate enum interface namespace struct +syn keyword csRepeat break continue do for foreach goto return while +syn keyword csConditional else if switch +syn keyword csLabel case default +syn match csOperatorError display +::+ +syn match csGlobal display +global::+ " user labels (see [1] 8.6 Statements) -syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ -" modifier -syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile -" constant -syn keyword csConstant false null true -" exception -syn keyword csException try catch finally throw - -" TODO: -syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using -" TODO: -syn keyword csUnsupportedStatement add remove value -" TODO: -syn keyword csUnspecifiedKeyword explicit implicit +syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ +syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile +syn keyword csConstant false null true +syn keyword csException try catch finally throw when +syn keyword csLinq ascending by descending equals from group in into join let on orderby select where +syn keyword csAsync async await +syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using +syn keyword csUnsupportedStatement add remove value +syn keyword csUnspecifiedKeyword explicit implicit " Contextual Keywords -syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5 -syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7 -syn match csContextualStatement /\<\(get\|set\)[[:space:]\n]*{/me=s+3 -syn match csContextualStatement /\<where\>[^:]\+:/me=s+5 +syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5 +syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7 +syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3 +syn match csContextualStatement /\<where\>[^:]\+:/me=s+5 + +" Punctuation +syn match csBraces "[{}\[\]]" display +syn match csParens "[()]" display +syn match csOpSymbols "[+\-><=]\{1,2}" display +syn match csOpSymbols "[!><+\-*/]=" display +syn match csOpSymbols "[!*/^]" display +syn match csOpSymbols "=>" display +syn match csEndColon ";" display +syn match csLogicSymbols "&&" display +syn match csLogicSymbols "||" display +syn match csLogicSymbols "?" display +syn match csLogicSymbols ":" display " Comments " " PROVIDES: @csCommentHook -" -" TODO: include strings ? -" -syn keyword csTodo contained TODO FIXME XXX NOTE -syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell -syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell +syn keyword csTodo contained TODO FIXME XXX NOTE HACK TBD +syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell +syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell " xml markup inside '///' comments -syn cluster xmlRegionHook add=csXmlCommentLeader -syn cluster xmlCdataHook add=csXmlCommentLeader -syn cluster xmlStartTagHook add=csXmlCommentLeader -syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName -syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo -syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base -syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute -syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue -syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage -syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary -syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote -syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript -syn keyword csXmlTag contained list listheader item term description altcompliant altmember +syn cluster xmlRegionHook add=csXmlCommentLeader +syn cluster xmlCdataHook add=csXmlCommentLeader +syn cluster xmlStartTagHook add=csXmlCommentLeader +syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName +syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo +syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base +syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute +syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue +syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage +syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary +syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote +syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript +syn keyword csXmlTag contained list listheader item term description altcompliant altmember syn cluster xmlTagHook add=csXmlTag -syn match csXmlCommentLeader +\/\/\/+ contained -syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell -syntax include @csXml syntax/xml.vim -hi def link xmlRegion Comment +syn match csXmlCommentLeader +\/\/\/+ contained +syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell +syn include @csXml syntax/xml.vim +hi def link xmlRegion Comment " [1] 9.5 Pre-processing directives -syn region csPreCondit - \ start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" - \ skip="\\$" end="$" contains=csComment keepend -syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" - \ end="^\s*#\s*endregion" transparent fold contains=TOP +syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend +syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" end="^\s*#\s*endregion" transparent fold contains=TOP +syn region csSummary start="^\s*/// <summary" end="^\%\(\s*///\)\@!" transparent fold keepend +syn region csClassType start="@\@1<!\<class\>"hs=s+6 end="[:\n{]"me=e-1 contains=csClass +syn region csNewType start="@\@1<!\<new\>"hs=s+4 end="[;\n{(<\[]"me=e-1 contains=csNew contains=csNewType +syn region csIsType start=" is "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs +syn region csIsType start=" as "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs +syn keyword csNew new contained +syn keyword csClass class contained +syn keyword csIsAs is as " Strings and constants -syn match csSpecialError contained "\\." -syn match csSpecialCharError contained "[^']" +syn match csSpecialError "\\." contained +syn match csSpecialCharError "[^']" contained " [1] 9.4.4.4 Character literals -syn match csSpecialChar contained +\\["\\'0abfnrtvx]+ -" unicode characters -syn match csUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=csUnicodeSpecifier -syn match csUnicodeSpecifier +\\[uU]+ contained -syn region csVerbatimString start=+@"+ end=+"+ skip=+""+ contains=csVerbatimSpec,@Spell -syn match csVerbatimSpec +@"+he=s+1 contained -syn region csString start=+"+ end=+"+ end=+$+ contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell -syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError -syn match csCharacter "'\\''" contains=csSpecialChar -syn match csCharacter "'[^\\]'" -syn match csNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" -syn match csNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" -syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" -syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" +syn match csSpecialChar +\\["\\'0abfnrtvx]+ contained display +syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier display +syn match csUnicodeNumber +\\U\x\{8}+ contained contains=csUnicodeSpecifier display +syn match csUnicodeSpecifier +\\[uU]+ contained display + +syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell +syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError display +syn match csCharacter "'\\''" contains=csSpecialChar display +syn match csCharacter "'[^\\]'" display +syn match csNumber "\<0[0-7]*[lL]\=\>" display +syn match csNumber "\<0[xX]\x\+[lL]\=\>" display +syn match csNumber "\<\d\+[lL]\=\>" display +syn match csNumber "\<\d\+\.\d*\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display +syn match csNumber "\.\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display +syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" display +syn match csNumber "\<\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\>" display + +syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ end=+$+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell + +syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBracketed,csInterpolationAlign,csInterpolationFormat +syn match csEscapedInterpolation "{{" transparent contains=NONE display +syn match csEscapedInterpolation "}}" transparent contains=NONE display +syn region csInterpolationAlign matchgroup=csInterpolationAlignDel start=+,+ end=+}+ end=+:+me=e-1 contained contains=csNumber,csConstant,csCharacter,csParens,csOpSymbols,csString,csBracketed display +syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFormatDel display +syn match csInterpolationAlignDel +,+ contained display +syn match csInterpolationFormatDel +:+ contained display + +syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell +syn match csVerbatimQuote +""+ contained +syn match csQuoteError +@$"+he=s+2,me=s+2 + +syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell + +syn region csBracketed matchgroup=csParens start=+(+ end=+)+ contained transparent contains=@csAll,csBracketed + +syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csInterpolatedString,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csUnicodeNumber,csUnicodeSpecifier,csVerbatimString " The default highlighting. -hi def link csType Type -hi def link csStorage StorageClass -hi def link csRepeat Repeat -hi def link csConditional Conditional -hi def link csLabel Label -hi def link csModifier StorageClass -hi def link csConstant Constant -hi def link csException Exception -hi def link csUnspecifiedStatement Statement -hi def link csUnsupportedStatement Statement -hi def link csUnspecifiedKeyword Keyword -hi def link csContextualStatement Statement -hi def link csOperatorError Error - -hi def link csTodo Todo -hi def link csComment Comment - -hi def link csSpecialError Error -hi def link csSpecialCharError Error -hi def link csString String -hi def link csVerbatimString String -hi def link csVerbatimSpec SpecialChar -hi def link csPreCondit PreCondit -hi def link csCharacter Character -hi def link csSpecialChar SpecialChar -hi def link csNumber Number -hi def link csUnicodeNumber SpecialChar -hi def link csUnicodeSpecifier SpecialChar +hi def link csType Type +hi def link csNewType Type +hi def link csClassType Type +hi def link csIsType Type +hi def link csStorage StorageClass +hi def link csClass StorageClass +hi def link csRepeat Repeat +hi def link csConditional Conditional +hi def link csLabel Label +hi def link csModifier StorageClass +hi def link csConstant Constant +hi def link csException Exception +hi def link csUnspecifiedStatement Statement +hi def link csUnsupportedStatement Statement +hi def link csUnspecifiedKeyword Keyword +hi def link csNew Statement +hi def link csLinq Statement +hi def link csIsAs Keyword +hi def link csAsync Keyword +hi def link csContextualStatement Statement +hi def link csOperatorError Error +hi def link csInterfaceDeclaration Include + +hi def link csTodo Todo +hi def link csComment Comment + +hi def link csEndColon Statement +hi def link csOpSymbols Operator +hi def link csLogicSymbols Boolean +hi def link csBraces Function +hi def link csParens Operator + +hi def link csSpecialError Error +hi def link csSpecialCharError Error +hi def link csString String +hi def link csQuote String +hi def link csQuoteError Error +hi def link csInterpolatedString String +hi def link csVerbatimString String +hi def link csInterVerbString String +hi def link csVerbatimQuote SpecialChar +hi def link csPreCondit PreCondit +hi def link csCharacter Character +hi def link csSpecialChar SpecialChar +hi def link csNumber Number +hi def link csUnicodeNumber SpecialChar +hi def link csUnicodeSpecifier SpecialChar +hi def link csInterpolationDelimiter Delimiter +hi def link csInterpolationAlignDel csInterpolationDelimiter +hi def link csInterpolationFormat csInterpolationDelimiter +hi def link csInterpolationFormatDel csInterpolationDelimiter " xml markup -hi def link csXmlCommentLeader Comment -hi def link csXmlComment Comment -hi def link csXmlTag Statement +hi def link csXmlCommentLeader Comment +hi def link csXmlComment Comment +hi def link csXmlTag Statement let b:current_syntax = "cs" let &cpo = s:cs_cpo_save unlet s:cs_cpo_save -" vim: ts=8 +" vim: vts=16,28 diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 23db7b10e8..ecdbc1795c 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -4,10 +4,10 @@ " Claudio Fleiner <claudio@fleiner.com> (Maintainer) " Yeti (Add full CSS2, HTML4 support) " Nikolai Weibull (Add CSS2 support) -" Maintainer: Jules Wang <w.jq0722@gmail.com> " URL: https://github.com/JulesWang/css.vim -" Last Change: 2017 Jan 14 -" cssClassName updated by Ryuichi Hayashida Jan 2016 +" Maintainer: Jules Wang <w.jq0722@gmail.com> +" Last Change: 2018 Feb. 27 +" cssClassName updated by Ryuichi Hayashida Jan 2016 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -69,74 +69,12 @@ endtry " digits syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators -syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators - -syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained -" @media -syn region cssInclude start=/@media\>/ end=/\ze{/ skipwhite skipnl contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssIncludeKeyword,cssMediaComma,cssComment nextgroup=cssMediaBlock -syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained skipwhite skipnl -syn keyword cssMediaKeyword only not and contained -syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssTagName,cssClassName,cssIdentifier,cssPseudoClass,cssSelectorOp,cssSelectorOp2,cssAttributeSelector fold -syn match cssMediaComma "," skipwhite skipnl contained - -" Reference: http://www.w3.org/TR/css3-mediaqueries/ -syn keyword cssMediaProp contained width height orientation scan grid -syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ -syn keyword cssMediaAttr contained portrait landscape progressive interlace - -" @page -" http://www.w3.org/TR/css3-page/ -syn match cssPage "@page\>[^{]*{\@=" contains=cssPagePseudo,cssIncludeKeyword nextgroup=cssPageWrap transparent skipwhite skipnl -syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl -syn region cssPageWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssPageMargin,cssPageProp,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks -syn match cssPageMargin /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition skipwhite skipnl -syn keyword cssPageProp contained content size -" http://www.w3.org/TR/CSS2/page.html#break-inside -syn keyword cssPageProp contained orphans widows - -" @keyframe -" http://www.w3.org/TR/css3-animations/#keyframes -syn match cssKeyFrame "@\(-[a-z]\+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent -syn region cssKeyFrameWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssKeyFrameSelector -syn match cssKeyFrameSelector /\(\d*%\|from\|to\)\=/ contained skipwhite skipnl nextgroup=cssDefinition - -" @import -syn region cssInclude start=/@import\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword,cssURL,cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType -syn region cssInclude start=/@charset\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword -syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword - -" @font-face -" http://www.w3.org/TR/css3-fonts/#at-font-face-rule -syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl -syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise - -syn match cssFontDescriptorProp contained "\<font-family\>" -syn keyword cssFontDescriptorProp contained src -syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>" -syn match cssFontDescriptorProp contained "\<unicode-range\>" -syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>" - -" src functions -syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend -" font-sytle and font-weight attributes -syn keyword cssFontDescriptorAttr contained normal italic oblique bold -" font-stretch attributes -syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" -" unicode-range attributes -syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" -syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" -" font-feature-settings attributes -syn keyword cssFontDescriptorAttr contained on off - - - " The 16 basic color names syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow @@ -162,8 +100,8 @@ syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajow syn keyword cssColor contained oldlace olivedrab orange orangered orchid syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/ syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue -syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown -syn keyword cssColor contained seagreen seashell sienna skyblue slateblue +syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon +syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan syn keyword cssColor contained thistle tomato turquoise violet wheat syn keyword cssColor contained whitesmoke yellowgreen @@ -180,10 +118,11 @@ syn match cssImportant contained "!\s*important\>" syn match cssColor contained "\<transparent\>" syn match cssColor contained "\<currentColor\>" syn match cssColor contained "\<white\>" -syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" contains=cssUnitDecorators -syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators -syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" contains=cssStringQ,cssStringQQ oneline +syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma @@ -224,7 +163,6 @@ syn keyword cssBackgroundAttr contained left center right top bottom " background-repeat attributes syn match cssBackgroundAttr contained "\<no-repeat\>" syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>" -syn keyword cssBackgroundAttr contained space round " background-size attributes syn keyword cssBackgroundAttr contained cover contain @@ -236,7 +174,7 @@ syn match cssBorderProp contained "\<box-decoration-break\>" syn match cssBorderProp contained "\<box-shadow\>" " border-image attributes -syn keyword cssBorderAttr contained stretch round space fill +syn keyword cssBorderAttr contained stretch round fill " border-style attributes syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset @@ -264,14 +202,18 @@ syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>" syn keyword cssDimensionProp contained height syn keyword cssDimensionProp contained width -" shadow and sizing are in other property groups -syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>" -syn keyword cssFlexibleBoxAttr contained start end baseline -syn keyword cssFlexibleBoxAttr contained reverse -syn keyword cssFlexibleBoxAttr contained single multiple -syn keyword cssFlexibleBoxAttr contained horizontal -syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>" "escape vertical-align -syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>" +" CSS Flexible Box Layout Module Level 1 +" http://www.w3.org/TR/css3-flexbox/ +" CSS Box Alignment Module Level 3 +" http://www.w3.org/TR/css-align-3/ +syn match cssFlexibleBoxProp contained "\<flex\(-\(direction\|wrap\|flow\|grow\|shrink\|basis\)\)\=\>" +syn match cssFlexibleBoxProp contained "\<\(align\|justify\)\(-\(items\|self\|content\)\)\=\>" +syn keyword cssFlexibleBoxProp contained order + +syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" +syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center +syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>" +syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\)\)\=\>" " CSS Fonts Module Level 3 " http://www.w3.org/TR/css-fonts-3/ @@ -279,11 +221,11 @@ syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\ " font attributes syn keyword cssFontAttr contained icon menu caption -syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" syn match cssFontAttr contained "\<message-box\>" syn match cssFontAttr contained "\<status-bar\>" syn keyword cssFontAttr contained larger smaller syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" +syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" " font-family attributes syn match cssFontAttr contained "\<\(sans-\)\=serif\>" syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf @@ -312,12 +254,16 @@ syn match cssMultiColumnProp contained "\<break-\(after\|before\|inside\)\>" syn match cssMultiColumnProp contained "\<column-\(count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\=\|span\|width\)\>" syn keyword cssMultiColumnProp contained columns syn keyword cssMultiColumnAttr contained balance medium -syn keyword cssMultiColumnAttr contained always avoid left right page column -syn match cssMultiColumnAttr contained "\<avoid-\(page\|column\)\>" +syn keyword cssMultiColumnAttr contained always left right page column +syn match cssMultiColumnAttr contained "\<avoid\(-\(page\|column\)\)\=\>" " http://www.w3.org/TR/css3-break/#page-break syn match cssMultiColumnProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>" +" http://www.w3.org/TR/SVG11/interact.html +syn match cssInteractProp contained "\<pointer-events\>" +syn match cssInteractAttr contained "\<\(visible\)\=\(Painted\|Fill\|Stroke\)\=\>" + " TODO find following items in w3c docs. syn keyword cssGeneratedContentProp contained quotes crop syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>" @@ -325,7 +271,12 @@ syn match cssGeneratedContentProp contained "\<move-to\>" syn match cssGeneratedContentProp contained "\<page-policy\>" syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" -syn match cssGridProp contained "\<grid-\(columns\|rows\)\>" +" https://www.w3.org/TR/css-grid-1/ +syn match cssGridProp contained "\<grid\>" +syn match cssGridProp contained "\<grid\(-\(template\|auto\)\)\=\(-\(columns\|rows\|areas\)\)\>" +syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" +syn match cssGridProp contained "\<grid-\(area\|gap\)\>" +syn match cssGridProp contained "\<grid-auto-flow\>" syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" @@ -339,14 +290,14 @@ syn keyword cssListAttr contained inside outside syn keyword cssPositioningProp contained bottom clear clip display float left syn keyword cssPositioningProp contained position right top visibility syn match cssPositioningProp contained "\<z-index\>" -syn keyword cssPositioningAttr contained block compact +syn keyword cssPositioningAttr contained block compact grid syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" syn keyword cssPositioningAttr contained left right both syn match cssPositioningAttr contained "\<list-item\>" -syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\)\)\=\>" -syn keyword cssPositioningAttr contained static relative absolute fixed +syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" +syn keyword cssPositioningAttr contained static relative absolute fixed subgrid -syn keyword cssPrintAttr contained landscape portrait crop cross always avoid +syn keyword cssPrintAttr contained landscape portrait crop cross always syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" syn keyword cssTableAttr contained fixed collapse separate show hide once always @@ -419,17 +370,20 @@ syn keyword cssUIAttr contained both horizontal vertical syn match cssUIProp contained "\<text-overflow\>" syn keyword cssUIAttr contained clip ellipsis -" Already highlighted Props: font content +syn match cssUIProp contained "\<image-rendering\>" +syn keyword cssUIAttr contained pixellated +syn match cssUIAttr contained "\<crisp-edges\>" + "------------------------------------------------ " Webkit/iOS specific attributes -syn match cssUIAttr contained '\(preserve-3d\)' +syn match cssUIAttr contained '\<preserve-3d\>' " IE specific attributes -syn match cssIEUIAttr contained '\(bicubic\)' +syn match cssIEUIAttr contained '\<bicubic\>' " Webkit/iOS specific properties -syn match cssUIProp contained '\(tap-highlight-color\|user-select\|touch-callout\)' +syn match cssUIProp contained '\<tap-highlight-color\|user-select\|touch-callout\>' " IE specific properties -syn match cssIEUIProp contained '\(interpolation-mode\|zoom\|filter\)' +syn match cssIEUIProp contained '\<interpolation-mode\|zoom\|filter\>' " Webkit/Firebox specific properties/attributes syn keyword cssUIProp contained appearance @@ -454,11 +408,25 @@ syn keyword cssAuralAttr contained male female child code digits continuous " mobile text syn match cssMobileTextProp contained "\<text-size-adjust\>" - +syn keyword cssMediaProp contained width height orientation scan grid +syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ +syn keyword cssMediaAttr contained portrait landscape progressive interlace +syn match cssKeyFrameProp /\d*%\|from\|to/ contained nextgroup=cssDefinition +syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition +syn keyword cssPageProp contained content size +syn keyword cssPageProp contained orphans widows +syn keyword cssFontDescriptorProp contained src +syn match cssFontDescriptorProp contained "\<unicode-range\>" +" unicode-range attributes +syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" +syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" syn match cssBraces contained "[{}]" syn match cssError contained "{@<>" -syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold +syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold syn match cssBraceError "}" syn match cssAttrComma "," @@ -477,7 +445,7 @@ syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>" syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" " Misc highlight groups -syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained +syntax match cssUnitDecorators /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained syntax match cssNoise contained /\(:\|;\|\/\)/ " Comment @@ -490,7 +458,7 @@ syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEsc syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ " Vendor Prefix -syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)" +syn match cssVendor contained "-\(webkit\|moz\|o\|ms\)-" " Various CSS Hack characters " In earlier versions of IE (6 and 7), one can prefix property names @@ -508,6 +476,34 @@ syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.* " 'transition' has Props after ':'. syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise +syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ contained + +syn keyword cssAtRuleLogical only not and contained + +" @media +" Reference: http://www.w3.org/TR/css3-mediaqueries/ +syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment nextgroup=cssDefinition +syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained + +" @page +" http://www.w3.org/TR/css3-page/ +syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition +syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl +" @keyframe +" http://www.w3.org/TR/css3-animations/#keyframes +syn region cssAtRule start=/@\(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition + +syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType +syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword +syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword + +" @font-face +" http://www.w3.org/TR/css3-fonts/#at-font-face-rule +syn match cssAtRule "@font-face\>" nextgroup=cssFontDescriptorBlock +" @supports +" https://www.w3.org/TR/css3-conditional/#at-supports +syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition + if main_syntax == "css" syn sync minlines=10 @@ -537,6 +533,7 @@ hi def link cssFontProp cssProp hi def link cssGeneratedContentProp cssProp hi def link cssGridProp cssProp hi def link cssHyerlinkProp cssProp +hi def link cssInteractProp cssProp hi def link cssLineboxProp cssProp hi def link cssListProp cssProp hi def link cssMarqueeProp cssProp @@ -567,6 +564,7 @@ hi def link cssFontAttr cssAttr hi def link cssGeneratedContentAttr cssAttr hi def link cssGridAttr cssAttr hi def link cssHyerlinkAttr cssAttr +hi def link cssInteractAttr cssAttr hi def link cssLineboxAttr cssAttr hi def link cssListAttr cssAttr hi def link cssMarginAttr cssAttr @@ -603,8 +601,8 @@ hi def link cssFunctionName Function hi def link cssFunctionComma Function hi def link cssColor Constant hi def link cssIdentifier Function -hi def link cssInclude Include -hi def link cssIncludeKeyword atKeyword +hi def link cssAtRule Include +hi def link cssAtKeyword PreProc hi def link cssImportant Special hi def link cssBraces Function hi def link cssBraceError Error @@ -613,20 +611,16 @@ hi def link cssUnicodeEscape Special hi def link cssStringQQ String hi def link cssStringQ String hi def link cssAttributeSelector String -hi def link cssMedia atKeyword hi def link cssMediaType Special hi def link cssMediaComma Normal -hi def link cssMediaKeyword Statement +hi def link cssAtRuleLogical Statement hi def link cssMediaProp cssProp hi def link cssMediaAttr cssAttr -hi def link cssPage atKeyword hi def link cssPagePseudo PreProc -hi def link cssPageMargin atKeyword +hi def link cssPageMarginProp cssAtKeyword hi def link cssPageProp cssProp -hi def link cssKeyFrame atKeyword -hi def link cssKeyFrameSelector Constant +hi def link cssKeyFrameProp Constant hi def link cssFontDescriptor Special -hi def link cssFontDescriptorFunction Constant hi def link cssFontDescriptorProp cssProp hi def link cssFontDescriptorAttr cssAttr hi def link cssUnicodeRange Constant @@ -636,7 +630,6 @@ hi def link cssProp StorageClass hi def link cssAttr Constant hi def link cssUnitDecorators Number hi def link cssNoise Noise -hi def link atKeyword PreProc let b:current_syntax = "css" diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim index cfc70b9ea8..13d70e343a 100644 --- a/runtime/syntax/cuda.vim +++ b/runtime/syntax/cuda.vim @@ -1,15 +1,15 @@ " Vim syntax file " Language: CUDA (NVIDIA Compute Unified Device Architecture) " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net> -" Last Change: 2007 Oct 13 +" Last Change: 2018 Feb 06 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif -" Read the C syntax to start with -runtime! syntax/c.vim +" Read the C++ syntax to start with +runtime! syntax/cpp.vim " CUDA extentions syn keyword cudaStorageClass __device__ __global__ __host__ diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 6e6ed1951a..edaaf6128f 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Debian changelog files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2017 Apr 23 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim +" Last Change: 2018 May 03 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes' syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"' exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"' -syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" @@ -46,6 +46,6 @@ hi def link debchangelogVersion Identifier hi def link debchangelogTarget Identifier hi def link debchangelogEmail Special -let b:current_syntax = "debchangelog" +let b:current_syntax = 'debchangelog' " vim: ts=8 sw=2 diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b8790747aa..9085cd01d5 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Debian control files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2017 Nov 04 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim +" Last Change: 2018 Aug 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -30,7 +30,7 @@ let s:kernels = ['linux', 'hurd', 'kfreebsd', 'knetbsd', 'kopensolaris', 'netbsd let s:archs = [ \ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa' \, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips' - \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 's390x', 's390', 'sh3eb' + \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 'riscv64', 's390x', 's390', 'sh3eb' \, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32' \ ] let s:pairs = [ @@ -40,8 +40,8 @@ let s:pairs = [ " Define some common expressions we can use later on syn keyword debcontrolArchitecture contained all any -exe 'syn keyword debcontrolArchitecture contained '. join(map(s:kernels, {k,v -> v .'-any'})) -exe 'syn keyword debcontrolArchitecture contained '. join(map(s:archs, {k,v -> 'any-'.v})) +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:kernels), {k,v -> v .'-any'})) +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:archs), {k,v -> 'any-'.v})) exe 'syn keyword debcontrolArchitecture contained '. join(s:archs) exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs) @@ -52,7 +52,7 @@ let s:sections = [ \, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded' \, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics' \, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection' - \, 'java', 'javascript', 'kde', 'kernel', 'libs', 'libdevel', 'lisp' + \, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp' \, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net' \, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python' \, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex' @@ -87,44 +87,29 @@ syn match debcontrolComment "^#.*$" contains=@Spell syn case ignore -" List of all legal keys, in order, from deb-src-control(5) -" Source fields -syn match debcontrolKey contained "^\%(Source\|Maintainer\|Uploaders\|Standards-Version\|Description\|Homepage\|Bugs\|Rules-Requires-Root\): *" -syn match debcontrolKey contained "^\%(XS-\)\=Vcs-\%(Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\|Browser\): *" -syn match debcontrolKey contained "^\%(Origin\|Section\|Priority\): *" -syn match debcontrolKey contained "^Build-\%(Depends\|Conflicts\)\%(-Arch\|-Indep\)\=: *" - -" Binary fields -syn match debcontrolKey contained "^\%(Package\%(-Type\)\=\|Architecture\|Build-Profiles\): *" -syn match debcontrolKey contained "^\%(\%(Build-\)\=Essential\|Multi-Arch\|Tag\): *" -syn match debcontrolKey contained "^\%(\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\): *" -syn match debcontrolKey contained "^\%(Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): *" - -" User-defined fields -syn match debcontrolKey contained "^X[SBC]\{0,3\}\%(-Private\)\=-[-a-zA-Z0-9]\+: *" - -syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *" +" Handle all fields from deb-src-control(5) " Fields for which we do strict syntax checking -syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline -syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline -syn region debcontrolStrictField start="^\%(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline -syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline -syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline -syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline -syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline -syn region debcontrolStrictField start="^Rules-Requires-Root" end="$" contains=debcontrolKey,debcontrolR3 oneline -syn region debcontrolStrictField start="^\%(Build-\)\=Essential" end="$" contains=debcontrolKey,debcontrolYesNo oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Architecture: *" end="$" contains=debcontrolArchitecture,debcontrolSpace oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Multi-Arch: *" end="$" contains=debcontrolMultiArch oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Package\|Source\): *" end="$" contains=debcontrolName oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Priority: *" end="$" contains=debcontrolPriority oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Section: *" end="$" contains=debcontrolSection oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XC-\)\=Package-Type: *" end="$" contains=debcontrolPackageType oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Homepage: *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\): *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Svn: *" end="$" contains=debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Cvs: *" end="$" contains=debcontrolVcsCvs oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Git: *" end="$" contains=debcontrolVcsGit oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Rules-Requires-Root: *" end="$" contains=debcontrolR3 oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Build-\)\=Essential: *" end="$" contains=debcontrolYesNo oneline + +syn region debcontrolStrictField matchgroup=debcontrolDeprecatedKey start="^\%(XS-\)\=DM-Upload-Allowed: *" end="$" contains=debcontrolDmUpload oneline " Catch-all for the other legal fields -syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline -syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment -syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell +syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment +syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Associate our matches and regions with pretty colours hi def link debcontrolKey Keyword @@ -150,7 +135,7 @@ hi def link debcontrolR3 Identifier hi def link debcontrolComment Comment hi def link debcontrolElse Special -let b:current_syntax = "debcontrol" +let b:current_syntax = 'debcontrol' let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim new file mode 100644 index 0000000000..c85ca372d0 --- /dev/null +++ b/runtime/syntax/debcopyright.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: Debian copyright file +" Maintainer: Debian Vim Maintainers +" Last Change: 2018 Feb 05 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\): *" +syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcopyrightEmail "<.\{-}>" +syn match debcopyrightComment "^#.*$" contains=@Spell + +hi def link debcopyrightUrl Identifier +hi def link debcopyrightKey Keyword +hi def link debcopyrightEmail Identifier +hi def link debcopyrightComment Comment + +let b:current_syntax = 'debcopyright' + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 6791ece294..74e8d42d1c 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Debian sources.list -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2017 Oct 28 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim +" Last Change: 2018 Aug 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -25,7 +25,7 @@ let s:supported = [ \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', \ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', \ - \ 'trusty', 'xenial', 'zesty', 'artful', 'bionic', 'devel' + \ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel' \ ] let s:unsupported = [ \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', @@ -34,12 +34,12 @@ let s:unsupported = [ \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', - \ 'utopic', 'vivid', 'wily', 'yakkety' + \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful' \ ] let &cpo=s:cpo " Match uri's -syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' @@ -51,4 +51,4 @@ hi def link debsourcesUnsupportedDistrKeyword WarningMsg hi def link debsourcesComment Comment hi def link debsourcesUri Constant -let b:current_syntax = "debsources" +let b:current_syntax = 'debsources' diff --git a/runtime/syntax/dircolors.vim b/runtime/syntax/dircolors.vim index 3d7f63dc55..74a7068488 100644 --- a/runtime/syntax/dircolors.vim +++ b/runtime/syntax/dircolors.vim @@ -2,7 +2,7 @@ " Language: dircolors(1) input file " Maintainer: Jan Larres <jan@majutsushi.net> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2013-08-17 +" Latest Revision: 2018-02-19 if exists("b:current_syntax") finish @@ -135,6 +135,12 @@ function! s:preview_color(linenr) abort elseif item >= 40 && item <= 47 " ANSI SGR background color let hi_str .= s:get_hi_str(item - 40, 'bg') + elseif item >= 90 && item <= 97 + " ANSI SGR+8 foreground color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 82, 'fg') + elseif item >= 100 && item <= 107 + " ANSI SGR+8 background color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 92, 'bg') elseif item == 38 " Foreground for terminals with 88/256 color support let color = s:get_256color(colors) diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim index 6bd3726279..adc0c41dd6 100644 --- a/runtime/syntax/doxygen.vim +++ b/runtime/syntax/doxygen.vim @@ -2,11 +2,10 @@ " Language: doxygen on top of c, cpp, idl, java, php " Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net> " Author: Michael Geddes -" Last Changes: Jan 2009 (\tparam by Domnique Pelle, Aug 2013) -" Nov 2017 (@throws by Domnique Pelle) -" Version: 1.23 +" Last Change: November 2017 (\throws by Candy Gumdrop) +" Version: 1.27 " -" Copyright 2004-2008 Michael Geddes +" Copyright 2004-2017 Michael Geddes " Please feel free to use, modify & distribute all or part of this script, " providing this copyright message remains. " I would appreciate being acknowledged in any derived scripts, and would @@ -59,52 +58,76 @@ try " " C/C++ Style line comments - syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion - syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + + syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO,doxygenLeadingWhite keepend fold containedin=phpRegion + syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenLeadingLWhite,doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenCommentWhite2 fold containedin=phpRegion syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion + syn region doxygenComment start=+/\*@\ze[{}]+ end=+\*/+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion " Single line brief followed by multiline comment. + syn match doxygenCommentWhite2 +\_s*\ze/\*\(\*/\)\@![*!]+ contained nextgroup=doxygenComment2 syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl " Skip empty lines at the start for when comments start on the 2nd/3rd line. - syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl - syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl " Match the Starting pattern (effectively creating the start of a BNF) if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeaingLWhite,doxygenPrevL,doxygenBriefL,doxygenSpecial " Match the first sentence as a brief comment if ! exists('g:doxygen_end_punctuation') let g:doxygen_end_punctuation='[.]' endif - exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' + exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueCommentWhite,doxygenLeadingWhite,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' syn match doxygenBriefEndComment +\*/+ contained exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend' syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite else - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeadingLWhite,doxygenPrevL,doxygenLine,doxygenSpecial + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial syn region doxygenLine start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@<]+ start=+\<+ end='$' contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend syn match doxygenPrevL +<+ contained nextgroup=doxygenLine,doxygenSpecial skipwhite endif " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. - syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl + syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + " Match an [@\]brief so that it moves to body-mode. + " + " + " syn match doxygenBriefLine contained + syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite + " syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + + + +" end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ +"syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contains=doxygenContinueCommentWhite,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend matchgroup=xxx +syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ skipwhite keepend matchgroup=xxx +" syn region doxygenBriefLine matchgroup=xxxy contained start=+\<\k.\++ skip=+^\s*\k+ end=+end+ skipwhite keepend +"doxygenFindBriefSpecial, + "" syn region doxygenSpecialMultilineDesc start=+.\++ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend " Match a '<' for applying a comment to the previous element. - syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite + syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkipWhite skipwhite if exists("c_comment_strings") " These are anti-Doxygen comments. If there are more than two asterisks or 3 '/'s @@ -123,10 +146,11 @@ endif "syn region doxygenBodyBit contained start=+$+ " The main body of a doxygen comment. - syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell + syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueCommentWhite,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell " These allow the skipping of comment continuation '*' characters. - syn match doxygenContinueComment contained +^\s*\*/\@!\s*+ + syn match doxygenContinueCommentWhite contained +^\s*\ze\*+ nextgroup=doxygenContinueComment + syn match doxygenContinueComment contained +\*/\@!+ " Catch a Brief comment without punctuation - flag it as an error but " make sure the end comment is picked up also. @@ -135,27 +159,19 @@ endif " Skip empty lines at the start for when comments start on the 2nd/3rd line. if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief - syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\ze\*/\@!+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + "syn match doxygenStartSkipWhite +^\s*\ze\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl else - syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl - syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage,doxygenBody skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage,doxygenBody skipwhite skipnl endif - " Match an [@\]brief so that it moves to body-mode. - " - " - " syn match doxygenBriefLine contained - syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite - syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained - - " Create the single word matching special identifiers. fun! s:DxyCreateSmallSpecial( kword, name ) let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+' - exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word' + exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueCommentWhite,doxygen'.a:name.'Word' exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial,@Spell keepend' endfun call s:DxyCreateSmallSpecial('p', 'Code') @@ -180,40 +196,42 @@ endif " Match parameters and retvals (highlighting the first word as special). syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite - syn keyword doxygenParam contained param tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenTParam contained tparam nextgroup=doxygenParamName skipwhite syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite syn keyword doxygenRetval contained retval throw throws exception nextgroup=doxygenParamName skipwhite " Match one line identifiers. syn keyword doxygenOther contained addindex anchor \ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer - \ example htmlonly image include ingroup internal latexonly line - \ overload related relates relatedalso relatesalso sa skip skipline + \ example htmlonly image include includelineno ingroup internal latexonly line + \ overload relates relatesalso sa skip skipline \ until verbinclude version addtogroup htmlinclude copydoc dotfile \ xmlonly endxmlonly - \ nextgroup=doxygenSpecialOnelineDesc + \ nextgroup=doxygenSpecialOnelineDesc copybrief copydetails copyright dir extends + \ implements - syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+ - syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+ - if exists('b:current_syntax') + if exists('b:current_syntax') let b:doxygen_syntax_save=b:current_syntax unlet b:current_syntax endif syn include @Dotx syntax/dot.vim - if exists('b:doxygen_syntax_save') + if exists('b:doxygen_syntax_save') let b:current_syntax=b:doxygen_syntax_save unlet b:doxygen_syntax_save else unlet b:current_syntax endif - syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@NoSpell,@Dotx + syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueCommentWhite,@NoSpell,@Dotx syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+ " Match single line identifiers. @@ -224,13 +242,13 @@ endif syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc - syn keyword doxygenOther contained arg author authors date deprecated li result return returns see invariant note post pre remark remarks since test nextgroup=doxygenSpecialMultilineDesc + syn keyword doxygenOther contained arg author authors date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc " Handle \link, \endlink, highlighting the link-to and the link text bits separately. - syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial + syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueCommentWhite,doxygenLinkError,doxygenEndlinkSpecial syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+ syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment @@ -250,7 +268,7 @@ endif " Handle section syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent - syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment + syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueCommentWhite syn match doxygenSpecialIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc " Does the one-line description for the one-line type identifiers. @@ -260,8 +278,12 @@ endif " Handle the multiline description for the multiline type identifiers. " Continue until an 'empty' line (can contain a '*' continuation) or until the " next whole-line @ command \ command. - syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend + +" syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn match doxygenSpecialContinueCommentWhite contained +^\s*\ze\*+ nextgroup=doxygenSpecialContinueComment + syn match doxygenSpecialContinueComment contained +\*/\@!+ + " Handle special cases 'bold' and 'group' syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading @@ -288,7 +310,7 @@ endif " Supported HTML subset. Not perfect, but okay. syn case ignore - syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar + syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueCommentWhite,doxygenHtmlVar syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite @@ -298,7 +320,7 @@ endif syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink - syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment + syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueCommentWhite " Html Support syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop hi link doxygenHtmlLink Underlined @@ -343,7 +365,7 @@ endif syn cluster rcGroup add=doxygen.* let s:my_syncolor=0 - if !exists(':SynColor') + if !exists(':SynColor') command -nargs=+ SynColor hi def <args> let s:my_syncolor=1 endif @@ -469,6 +491,8 @@ endif call s:Doxygen_Hilights() + syn match doxygenLeadingWhite +\(^\s*\*\)\@<=\s*+ contained + " This is still a proposal, but won't do any harm. aug doxygengroup au! @@ -483,6 +507,7 @@ endif SynLink doxygenOtherTODO Todo SynLink doxygenOtherWARN Todo SynLink doxygenOtherBUG Todo + SynLink doxygenLeadingLWhite doxygenBody SynLink doxygenErrorSpecial Error SynLink doxygenErrorEnd Error @@ -517,7 +542,10 @@ endif SynLink doxygenBriefL doxygenBrief SynLink doxygenBriefLine doxygenBrief SynLink doxygenHeaderLine doxygenSpecialHeading - SynLink doxygenStartSkip doxygenContinueComment + SynLink doxygenCommentWhite Normal + SynLink doxygenCommentWhite2 doxygenCommentWhite + SynLink doxygenContinueCommentWhite doxygenCommentWhite + SynLink doxygenStartSkipWhite doxygenContinueCommentWhite SynLink doxygenLinkWord doxygenParamName SynLink doxygenLinkRest doxygenSpecialMultilineDesc SynLink doxygenHyperLink doxygenLinkWord @@ -591,5 +619,5 @@ finally let &cpo = s:cpo_save unlet s:cpo_save endtry - +let suppress_doxygen=1 " vim:et sw=2 sts=2 diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index 5f943a9496..cde5269d02 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -3,8 +3,8 @@ " Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2017 Sep 30 -" included patch from Christian Brabandt to make use of the strikethrough attributes +" Last Change: 2018 May 31 +" Included patch from Jay Sitter to add WAI-ARIA htmlArg keywords " " Please check :help html.vim for some comments and a description of the options @@ -77,6 +77,29 @@ syn keyword htmlArg contained size src start target text type url syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 +" aria attributes +syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>" +syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>" +syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>" +syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>" +syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>" +syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>" +syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>" +syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>" +syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>" +syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>" +syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>" +syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>" +syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>" +syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>" +syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>" +syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>" +syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>" +syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>" +syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>" +syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>" +syn keyword htmlArg contained role + " Netscape extensions syn keyword htmlTagName contained frame noframes frameset nobr blink syn keyword htmlTagName contained layer ilayer nolayer spacer @@ -100,11 +123,11 @@ syn keyword htmlArg contained summary tabindex valuetype version " html 5 arg names syn keyword htmlArg contained allowfullscreen async autocomplete autofocus syn keyword htmlArg contained autoplay challenge contenteditable contextmenu -syn keyword htmlArg contained controls crossorigin default dirname download -syn keyword htmlArg contained draggable dropzone form formaction formenctype -syn keyword htmlArg contained formmethod formnovalidate formtarget hidden -syn keyword htmlArg contained high icon inputmode keytype kind list loop low -syn keyword htmlArg contained max min minlength muted nonce novalidate open +syn keyword htmlArg contained controls crossorigin default dialog dirname +syn keyword htmlArg contained download draggable dropzone form formaction +syn keyword htmlArg contained formenctype formmethod formnovalidate formtarget +syn keyword htmlArg contained hidden high icon inputmode keytype kind list loop +syn keyword htmlArg contained low max min minlength muted nonce novalidate open syn keyword htmlArg contained optimum pattern placeholder poster preload syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 89320597f1..c9bb5dc2d4 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Java " Maintainer: Claudio Fleiner <claudio@fleiner.com> -" URL: http://www.fleiner.com/vim/syntax/java.vim -" Last Change: 2015 March 01 +" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim +" Last Change: 2018 July 26 " Please check :help java.vim for comments on some of the options available. @@ -29,8 +29,6 @@ syn match javaOK "\.\.\." syn match javaError2 "#\|=<" hi def link javaError2 javaError - - " keyword definitions syn keyword javaExternal native package syn match javaExternal "\<import\>\(\s\+static\>\)\?" @@ -40,7 +38,7 @@ syn keyword javaRepeat while for do syn keyword javaBoolean true false syn keyword javaConstant null syn keyword javaTypedef this super -syn keyword javaOperator new instanceof +syn keyword javaOperator var new instanceof syn keyword javaType boolean char byte short int long float double syn keyword javaType void syn keyword javaStatement return @@ -54,17 +52,25 @@ syn match javaTypedef "\.\s*\<class\>"ms=s+1 syn keyword javaClassDecl enum syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\<class\>"ms=s+1 -syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>\(([^)]*)\)\=" contains=javaString +syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" contains=javaString syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained syn match javaVarArg "\.\.\." syn keyword javaScopeDecl public protected private abstract +" Java Modules(Since Java 9, for "module-info.java" file) +if fnamemodify(bufname("%"), ":t") == "module-info.java" + syn keyword javaModuleStorageClass module transitive + syn keyword javaModuleStmt open requires exports opens uses provides + syn keyword javaModuleExternal to with + syn cluster javaTop add=javaModuleStorageClass,javaModuleStmt,javaModuleExternal +endif + if exists("java_highlight_java_lang_ids") let java_highlight_all=1 endif -if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") +if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") " java.lang.* syn match javaLangClass "\<System\>" syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException @@ -296,6 +302,7 @@ hi def link javaStorageClass StorageClass hi def link javaMethodDecl javaStorageClass hi def link javaClassDecl javaStorageClass hi def link javaScopeDecl javaStorageClass + hi def link javaBoolean Boolean hi def link javaSpecial Special hi def link javaSpecialError Error @@ -329,6 +336,12 @@ hi def link htmlComment Special hi def link htmlCommentPart Special hi def link javaSpaceError Error +if fnamemodify(bufname("%"), ":t") == "module-info.java" + hi def link javaModuleStorageClass StorageClass + hi def link javaModuleStmt Statement + hi def link javaModuleExternal Include +endif + let b:current_syntax = "java" if main_syntax == 'java' diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index 9589b1938f..78714d0170 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -7,8 +7,9 @@ " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members -" Last Change: 2012 Oct 05 +" Last Change: 2018 Jul 28 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) +" 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder) " tuning parameters: " unlet javaScript_fold @@ -34,10 +35,13 @@ syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,java syn match javaScriptSpecial "\\\d\d\d\|\\." syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc + +syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbededExpr syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" -syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline +syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline syn keyword javaScriptConditional if else switch syn keyword javaScriptRepeat while for do in @@ -56,6 +60,8 @@ syn keyword javaScriptMember document event location syn keyword javaScriptDeprecated escape unescape syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile +syn cluster javaScriptEmbededExpr contains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT + if exists("javaScript_fold") syn match javaScriptFunction "\<function\>" syn region javaScriptFunctionFold start="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend @@ -86,6 +92,7 @@ hi def link javaScriptCommentTodo Todo hi def link javaScriptSpecial Special hi def link javaScriptStringS String hi def link javaScriptStringD String +hi def link javaScriptStringT String hi def link javaScriptCharacter Character hi def link javaScriptSpecialCharacter javaScriptSpecial hi def link javaScriptNumber javaScriptValue @@ -113,6 +120,8 @@ hi def link javaScriptDeprecated Exception hi def link javaScriptReserved Keyword hi def link javaScriptDebug Debug hi def link javaScriptConstant Label +hi def link javaScriptEmbed Special + let b:current_syntax = "javascript" diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim index b02eb09d0a..b6aa04b2c7 100644 --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: Lisp " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: May 02, 2016 -" Version: 26 -" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP +" Last Change: Feb 15, 2018 +" Version: 27 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec " Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim @@ -40,8 +40,8 @@ syn case ignore " --------------------------------------------------------------------- " Lists: {{{1 -syn match lispSymbol contained ![^()'`,"; \t]\+! -syn match lispBarSymbol contained !|..\{-}|! +syn match lispSymbol contained ![^()'`,"; \t]\+! +syn match lispBarSymbol contained !|..\{-}|! if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 @@ -71,320 +71,320 @@ syn match lispLeadWhite contained "^\s\+" " --------------------------------------------------------------------- " Standard Lisp Functions and Macros: {{{1 -syn keyword lispFunc * find-method pprint-indent -syn keyword lispFunc ** find-package pprint-linear -syn keyword lispFunc *** find-restart pprint-logical-block -syn keyword lispFunc + find-symbol pprint-newline -syn keyword lispFunc ++ finish-output pprint-pop -syn keyword lispFunc +++ first pprint-tab -syn keyword lispFunc - fixnum pprint-tabular -syn keyword lispFunc / flet prin1 -syn keyword lispFunc // float prin1-to-string -syn keyword lispFunc /// float-digits princ -syn keyword lispFunc /= float-precision princ-to-string -syn keyword lispFunc 1+ float-radix print -syn keyword lispFunc 1- float-sign print-not-readable -syn keyword lispFunc < floating-point-inexact print-not-readable-object -syn keyword lispFunc <= floating-point-invalid-operation print-object -syn keyword lispFunc = floating-point-overflow print-unreadable-object -syn keyword lispFunc > floating-point-underflow probe-file -syn keyword lispFunc >= floatp proclaim -syn keyword lispFunc abort floor prog -syn keyword lispFunc abs fmakunbound prog* -syn keyword lispFunc access force-output prog1 -syn keyword lispFunc acons format prog2 -syn keyword lispFunc acos formatter progn -syn keyword lispFunc acosh fourth program-error -syn keyword lispFunc add-method fresh-line progv -syn keyword lispFunc adjoin fround provide -syn keyword lispFunc adjust-array ftruncate psetf -syn keyword lispFunc adjustable-array-p ftype psetq -syn keyword lispFunc allocate-instance funcall push -syn keyword lispFunc alpha-char-p function pushnew -syn keyword lispFunc alphanumericp function-keywords putprop -syn keyword lispFunc and function-lambda-expression quote -syn keyword lispFunc append functionp random -syn keyword lispFunc apply gbitp random-state -syn keyword lispFunc applyhook gcd random-state-p -syn keyword lispFunc apropos generic-function rassoc -syn keyword lispFunc apropos-list gensym rassoc-if -syn keyword lispFunc aref gentemp rassoc-if-not -syn keyword lispFunc arithmetic-error get ratio -syn keyword lispFunc arithmetic-error-operands get-decoded-time rational -syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize -syn keyword lispFunc array get-internal-real-time rationalp -syn keyword lispFunc array-dimension get-internal-run-time read -syn keyword lispFunc array-dimension-limit get-macro-character read-byte -syn keyword lispFunc array-dimensions get-output-stream-string read-char -syn keyword lispFunc array-displacement get-properties read-char-no-hang -syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list -syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print -syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string -syn keyword lispFunc array-rank getf read-line -syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace -syn keyword lispFunc array-row-major-index go read-sequence -syn keyword lispFunc array-total-size graphic-char-p reader-error -syn keyword lispFunc array-total-size-limit handler-bind readtable -syn keyword lispFunc arrayp handler-case readtable-case -syn keyword lispFunc ash hash-table readtablep -syn keyword lispFunc asin hash-table-count real -syn keyword lispFunc asinh hash-table-p realp -syn keyword lispFunc assert hash-table-rehash-size realpart -syn keyword lispFunc assoc hash-table-rehash-threshold reduce -syn keyword lispFunc assoc-if hash-table-size reinitialize-instance -syn keyword lispFunc assoc-if-not hash-table-test rem -syn keyword lispFunc atan host-namestring remf -syn keyword lispFunc atanh identity remhash -syn keyword lispFunc atom if remove -syn keyword lispFunc base-char if-exists remove-duplicates -syn keyword lispFunc base-string ignorable remove-if -syn keyword lispFunc bignum ignore remove-if-not -syn keyword lispFunc bit ignore-errors remove-method -syn keyword lispFunc bit-and imagpart remprop -syn keyword lispFunc bit-andc1 import rename-file -syn keyword lispFunc bit-andc2 in-package rename-package -syn keyword lispFunc bit-eqv in-package replace -syn keyword lispFunc bit-ior incf require -syn keyword lispFunc bit-nand initialize-instance rest -syn keyword lispFunc bit-nor inline restart -syn keyword lispFunc bit-not input-stream-p restart-bind -syn keyword lispFunc bit-orc1 inspect restart-case -syn keyword lispFunc bit-orc2 int-char restart-name -syn keyword lispFunc bit-vector integer return -syn keyword lispFunc bit-vector-p integer-decode-float return-from -syn keyword lispFunc bit-xor integer-length revappend -syn keyword lispFunc block integerp reverse -syn keyword lispFunc boole interactive-stream-p room -syn keyword lispFunc boole-1 intern rotatef -syn keyword lispFunc boole-2 internal-time-units-per-second round -syn keyword lispFunc boole-and intersection row-major-aref -syn keyword lispFunc boole-andc1 invalid-method-error rplaca -syn keyword lispFunc boole-andc2 invoke-debugger rplacd -syn keyword lispFunc boole-c1 invoke-restart safety -syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies -syn keyword lispFunc boole-clr isqrt sbit -syn keyword lispFunc boole-eqv keyword scale-float -syn keyword lispFunc boole-ior keywordp schar -syn keyword lispFunc boole-nand labels search -syn keyword lispFunc boole-nor lambda second -syn keyword lispFunc boole-orc1 lambda-list-keywords sequence -syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition -syn keyword lispFunc boole-set last set -syn keyword lispFunc boole-xor lcm set-char-bit -syn keyword lispFunc boolean ldb set-difference -syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character -syn keyword lispFunc boundp ldiff set-exclusive-or -syn keyword lispFunc break least-negative-double-float set-macro-character -syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch -syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char -syn keyword lispFunc built-in-class least-negative-normalized-long-float setf -syn keyword lispFunc butlast least-negative-normalized-short-float setq -syn keyword lispFunc byte least-negative-normalized-single-float seventh -syn keyword lispFunc byte-position least-negative-short-float shadow -syn keyword lispFunc byte-size least-negative-single-float shadowing-import -syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize -syn keyword lispFunc call-method least-positive-long-float shiftf -syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float -syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon -syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon -syn keyword lispFunc case least-positive-normalized-single-float short-site-name -syn keyword lispFunc catch least-positive-short-float signal -syn keyword lispFunc ccase least-positive-single-float signed-byte -syn keyword lispFunc cdr length signum -syn keyword lispFunc ceiling let simple-condition -syn keyword lispFunc cell-error let* simple-array -syn keyword lispFunc cell-error-name lisp simple-base-string -syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector -syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p -syn keyword lispFunc char list simple-condition-format-arguments -syn keyword lispFunc char-bit list* simple-condition-format-control -syn keyword lispFunc char-bits list-all-packages simple-error -syn keyword lispFunc char-bits-limit list-length simple-string -syn keyword lispFunc char-code listen simple-string-p -syn keyword lispFunc char-code-limit listp simple-type-error -syn keyword lispFunc char-control-bit load simple-vector -syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p -syn keyword lispFunc char-equal load-time-value simple-warning -syn keyword lispFunc char-font locally sin -syn keyword lispFunc char-font-limit log single-flaot-epsilon -syn keyword lispFunc char-greaterp logand single-float -syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon -syn keyword lispFunc char-int logandc2 single-float-negative-epsilon -syn keyword lispFunc char-lessp logbitp sinh -syn keyword lispFunc char-meta-bit logcount sixth -syn keyword lispFunc char-name logeqv sleep -syn keyword lispFunc char-not-equal logical-pathname slot-boundp -syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p -syn keyword lispFunc char-not-lessp logior slot-makunbound -syn keyword lispFunc char-super-bit lognand slot-missing -syn keyword lispFunc char-upcase lognor slot-unbound -syn keyword lispFunc char/= lognot slot-value -syn keyword lispFunc char< logorc1 software-type -syn keyword lispFunc char<= logorc2 software-version -syn keyword lispFunc char= logtest some -syn keyword lispFunc char> logxor sort -syn keyword lispFunc char>= long-float space -syn keyword lispFunc character long-float-epsilon special -syn keyword lispFunc characterp long-float-negative-epsilon special-form-p -syn keyword lispFunc check-type long-site-name special-operator-p -syn keyword lispFunc cis loop speed -syn keyword lispFunc class loop-finish sqrt -syn keyword lispFunc class-name lower-case-p stable-sort -syn keyword lispFunc class-of machine-instance standard -syn keyword lispFunc clear-input machine-type standard-char -syn keyword lispFunc clear-output machine-version standard-char-p -syn keyword lispFunc close macro-function standard-class -syn keyword lispFunc clrhash macroexpand standard-generic-function -syn keyword lispFunc code-char macroexpand-1 standard-method -syn keyword lispFunc coerce macroexpand-l standard-object -syn keyword lispFunc commonp macrolet step -syn keyword lispFunc compilation-speed make-array storage-condition -syn keyword lispFunc compile make-array store-value -syn keyword lispFunc compile-file make-broadcast-stream stream -syn keyword lispFunc compile-file-pathname make-char stream-element-type -syn keyword lispFunc compiled-function make-concatenated-stream stream-error -syn keyword lispFunc compiled-function-p make-condition stream-error-stream -syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format -syn keyword lispFunc compiler-macro make-echo-stream streamp -syn keyword lispFunc compiler-macro-function make-hash-table streamup -syn keyword lispFunc complement make-instance string -syn keyword lispFunc complex make-instances-obsolete string-capitalize -syn keyword lispFunc complexp make-list string-char -syn keyword lispFunc compute-applicable-methods make-load-form string-char-p -syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase -syn keyword lispFunc concatenate make-method string-equal -syn keyword lispFunc concatenated-stream make-package string-greaterp -syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim -syn keyword lispFunc cond make-random-state string-lessp -syn keyword lispFunc condition make-sequence string-not-equal -syn keyword lispFunc conjugate make-string string-not-greaterp -syn keyword lispFunc cons make-string-input-stream string-not-lessp -syn keyword lispFunc consp make-string-output-stream string-right-strim -syn keyword lispFunc constantly make-symbol string-right-trim -syn keyword lispFunc constantp make-synonym-stream string-stream -syn keyword lispFunc continue make-two-way-stream string-trim -syn keyword lispFunc control-error makunbound string-upcase -syn keyword lispFunc copy-alist map string/= -syn keyword lispFunc copy-list map-into string< -syn keyword lispFunc copy-pprint-dispatch mapc string<= -syn keyword lispFunc copy-readtable mapcan string= -syn keyword lispFunc copy-seq mapcar string> -syn keyword lispFunc copy-structure mapcon string>= -syn keyword lispFunc copy-symbol maphash stringp -syn keyword lispFunc copy-tree mapl structure -syn keyword lispFunc cos maplist structure-class -syn keyword lispFunc cosh mask-field structure-object -syn keyword lispFunc count max style-warning -syn keyword lispFunc count-if member sublim -syn keyword lispFunc count-if-not member-if sublis -syn keyword lispFunc ctypecase member-if-not subseq -syn keyword lispFunc debug merge subsetp -syn keyword lispFunc decf merge-pathname subst -syn keyword lispFunc declaim merge-pathnames subst-if -syn keyword lispFunc declaration method subst-if-not -syn keyword lispFunc declare method-combination substitute -syn keyword lispFunc decode-float method-combination-error substitute-if -syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not -syn keyword lispFunc defclass min subtypep -syn keyword lispFunc defconstant minusp svref -syn keyword lispFunc defgeneric mismatch sxhash -syn keyword lispFunc define-compiler-macro mod symbol -syn keyword lispFunc define-condition most-negative-double-float symbol-function -syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet -syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name -syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package -syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist -syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value -syn keyword lispFunc defmacro most-positive-fixnum symbolp -syn keyword lispFunc defmethod most-positive-long-float synonym-stream -syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol -syn keyword lispFunc defparameter most-positive-single-float sys -syn keyword lispFunc defsetf muffle-warning system -syn keyword lispFunc defstruct multiple-value-bind t -syn keyword lispFunc deftype multiple-value-call tagbody -syn keyword lispFunc defun multiple-value-list tailp -syn keyword lispFunc defvar multiple-value-prog1 tan -syn keyword lispFunc delete multiple-value-seteq tanh -syn keyword lispFunc delete-duplicates multiple-value-setq tenth -syn keyword lispFunc delete-file multiple-values-limit terpri -syn keyword lispFunc delete-if name-char the -syn keyword lispFunc delete-if-not namestring third -syn keyword lispFunc delete-package nbutlast throw -syn keyword lispFunc denominator nconc time -syn keyword lispFunc deposit-field next-method-p trace -syn keyword lispFunc describe nil translate-logical-pathname -syn keyword lispFunc describe-object nintersection translate-pathname -syn keyword lispFunc destructuring-bind ninth tree-equal -syn keyword lispFunc digit-char no-applicable-method truename -syn keyword lispFunc digit-char-p no-next-method truncase -syn keyword lispFunc directory not truncate -syn keyword lispFunc directory-namestring notany two-way-stream -syn keyword lispFunc disassemble notevery two-way-stream-input-stream -syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream -syn keyword lispFunc do nreconc type -syn keyword lispFunc do* nreverse type-error -syn keyword lispFunc do-all-symbols nset-difference type-error-datum -syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type -syn keyword lispFunc do-external-symbols nstring type-of -syn keyword lispFunc do-symbols nstring-capitalize typecase -syn keyword lispFunc documentation nstring-downcase typep -syn keyword lispFunc dolist nstring-upcase unbound-slot -syn keyword lispFunc dotimes nsublis unbound-slot-instance -syn keyword lispFunc double-float nsubst unbound-variable -syn keyword lispFunc double-float-epsilon nsubst-if undefined-function -syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport -syn keyword lispFunc dpb nsubstitute unintern -syn keyword lispFunc dribble nsubstitute-if union -syn keyword lispFunc dynamic-extent nsubstitute-if-not unless -syn keyword lispFunc ecase nth unread -syn keyword lispFunc echo-stream nth-value unread-char -syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte -syn keyword lispFunc echo-stream-output-stream null untrace -syn keyword lispFunc ed number unuse-package -syn keyword lispFunc eighth numberp unwind-protect -syn keyword lispFunc elt numerator update-instance-for-different-class -syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class -syn keyword lispFunc end-of-file oddp upgraded-array-element-type -syn keyword lispFunc endp open upgraded-complex-part-type -syn keyword lispFunc enough-namestring open-stream-p upper-case-p -syn keyword lispFunc ensure-directories-exist optimize use-package -syn keyword lispFunc ensure-generic-function or use-value -syn keyword lispFunc eq otherwise user -syn keyword lispFunc eql output-stream-p user-homedir-pathname -syn keyword lispFunc equal package values -syn keyword lispFunc equalp package-error values-list -syn keyword lispFunc error package-error-package vector -syn keyword lispFunc etypecase package-name vector-pop -syn keyword lispFunc eval package-nicknames vector-push -syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend -syn keyword lispFunc evalhook package-use-list vectorp -syn keyword lispFunc evenp package-used-by-list warn -syn keyword lispFunc every packagep warning -syn keyword lispFunc exp pairlis when -syn keyword lispFunc export parse-error wild-pathname-p -syn keyword lispFunc expt parse-integer with-accessors -syn keyword lispFunc extended-char parse-namestring with-compilation-unit -syn keyword lispFunc fboundp pathname with-condition-restarts -syn keyword lispFunc fceiling pathname-device with-hash-table-iterator -syn keyword lispFunc fdefinition pathname-directory with-input-from-string -syn keyword lispFunc ffloor pathname-host with-open-file -syn keyword lispFunc fifth pathname-match-p with-open-stream -syn keyword lispFunc file-author pathname-name with-output-to-string -syn keyword lispFunc file-error pathname-type with-package-iterator -syn keyword lispFunc file-error-pathname pathname-version with-simple-restart -syn keyword lispFunc file-length pathnamep with-slots -syn keyword lispFunc file-namestring peek-char with-standard-io-syntax -syn keyword lispFunc file-position phase write -syn keyword lispFunc file-stream pi write-byte -syn keyword lispFunc file-string-length plusp write-char -syn keyword lispFunc file-write-date pop write-line -syn keyword lispFunc fill position write-sequence -syn keyword lispFunc fill-pointer position-if write-string -syn keyword lispFunc find position-if-not write-to-string -syn keyword lispFunc find-all-symbols pprint y-or-n-p -syn keyword lispFunc find-class pprint-dispatch yes-or-no-p -syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop -syn keyword lispFunc find-if-not pprint-fill +syn keyword lispFunc < find-method pprint-indent +syn keyword lispFunc <= find-package pprint-linear +syn keyword lispFunc = find-restart pprint-logical-block +syn keyword lispFunc > find-symbol pprint-newline +syn keyword lispFunc >= finish-output pprint-pop +syn keyword lispFunc - first pprint-tab +syn keyword lispFunc / fixnum pprint-tabular +syn keyword lispFunc /= flet prin1 +syn keyword lispFunc // float prin1-to-string +syn keyword lispFunc /// float-digits princ +syn keyword lispFunc * floating-point-inexact princ-to-string +syn keyword lispFunc ** floating-point-invalid-operation print +syn keyword lispFunc *** floating-point-overflow print-not-readable +syn keyword lispFunc + floating-point-underflow print-not-readable-object +syn keyword lispFunc ++ floatp print-object +syn keyword lispFunc +++ float-precision print-unreadable-object +syn keyword lispFunc 1- float-radix probe-file +syn keyword lispFunc 1+ float-sign proclaim +syn keyword lispFunc abort floor prog +syn keyword lispFunc abs fmakunbound prog* +syn keyword lispFunc access force-output prog1 +syn keyword lispFunc acons format prog2 +syn keyword lispFunc acos formatter progn +syn keyword lispFunc acosh fourth program-error +syn keyword lispFunc add-method fresh-line progv +syn keyword lispFunc adjoin fround provide +syn keyword lispFunc adjustable-array-p ftruncate psetf +syn keyword lispFunc adjust-array ftype psetq +syn keyword lispFunc allocate-instance funcall push +syn keyword lispFunc alpha-char-p function pushnew +syn keyword lispFunc alphanumericp function-keywords putprop +syn keyword lispFunc and function-lambda-expression quote +syn keyword lispFunc append functionp random +syn keyword lispFunc apply gbitp random-state +syn keyword lispFunc applyhook gcd random-state-p +syn keyword lispFunc apropos generic-function rassoc +syn keyword lispFunc apropos-list gensym rassoc-if +syn keyword lispFunc aref gentemp rassoc-if-not +syn keyword lispFunc arithmetic-error get ratio +syn keyword lispFunc arithmetic-error-operands get-decoded-time rational +syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize +syn keyword lispFunc array getf rationalp +syn keyword lispFunc array-dimension gethash read +syn keyword lispFunc array-dimension-limit get-internal-real-time read-byte +syn keyword lispFunc array-dimensions get-internal-run-time read-char +syn keyword lispFunc array-displacement get-macro-character read-char-no-hang +syn keyword lispFunc array-element-type get-output-stream-string read-delimited-list +syn keyword lispFunc array-has-fill-pointer-p get-properties reader-error +syn keyword lispFunc array-in-bounds-p get-setf-expansion read-eval-print +syn keyword lispFunc arrayp get-setf-method read-from-string +syn keyword lispFunc array-rank get-universal-time read-line +syn keyword lispFunc array-rank-limit go read-preserving-whitespace +syn keyword lispFunc array-row-major-index graphic-char-p read-sequence +syn keyword lispFunc array-total-size handler-bind readtable +syn keyword lispFunc array-total-size-limit handler-case readtable-case +syn keyword lispFunc ash hash-table readtablep +syn keyword lispFunc asin hash-table-count real +syn keyword lispFunc asinh hash-table-p realp +syn keyword lispFunc assert hash-table-rehash-size realpart +syn keyword lispFunc assoc hash-table-rehash-threshold reduce +syn keyword lispFunc assoc-if hash-table-size reinitialize-instance +syn keyword lispFunc assoc-if-not hash-table-test rem +syn keyword lispFunc atan host-namestring remf +syn keyword lispFunc atanh identity remhash +syn keyword lispFunc atom if remove +syn keyword lispFunc base-char if-exists remove-duplicates +syn keyword lispFunc base-string ignorable remove-if +syn keyword lispFunc bignum ignore remove-if-not +syn keyword lispFunc bit ignore-errors remove-method +syn keyword lispFunc bit-and imagpart remprop +syn keyword lispFunc bit-andc1 import rename-file +syn keyword lispFunc bit-andc2 incf rename-package +syn keyword lispFunc bit-eqv initialize-instance replace +syn keyword lispFunc bit-ior inline require +syn keyword lispFunc bit-nand in-package rest +syn keyword lispFunc bit-nor in-package restart +syn keyword lispFunc bit-not input-stream-p restart-bind +syn keyword lispFunc bit-orc1 inspect restart-case +syn keyword lispFunc bit-orc2 int-char restart-name +syn keyword lispFunc bit-vector integer return +syn keyword lispFunc bit-vector-p integer-decode-float return-from +syn keyword lispFunc bit-xor integer-length revappend +syn keyword lispFunc block integerp reverse +syn keyword lispFunc boole interactive-stream-p room +syn keyword lispFunc boole-1 intern rotatef +syn keyword lispFunc boole-2 internal-time-units-per-second round +syn keyword lispFunc boolean intersection row-major-aref +syn keyword lispFunc boole-and invalid-method-error rplaca +syn keyword lispFunc boole-andc1 invoke-debugger rplacd +syn keyword lispFunc boole-andc2 invoke-restart safety +syn keyword lispFunc boole-c1 invoke-restart-interactively satisfies +syn keyword lispFunc boole-c2 isqrt sbit +syn keyword lispFunc boole-clr keyword scale-float +syn keyword lispFunc boole-eqv keywordp schar +syn keyword lispFunc boole-ior labels search +syn keyword lispFunc boole-nand lambda second +syn keyword lispFunc boole-nor lambda-list-keywords sequence +syn keyword lispFunc boole-orc1 lambda-parameters-limit serious-condition +syn keyword lispFunc boole-orc2 last set +syn keyword lispFunc boole-set lcm set-char-bit +syn keyword lispFunc boole-xor ldb set-difference +syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character +syn keyword lispFunc boundp ldiff set-exclusive-or +syn keyword lispFunc break least-negative-double-float setf +syn keyword lispFunc broadcast-stream least-negative-long-float set-macro-character +syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-pprint-dispatch +syn keyword lispFunc built-in-class least-negative-normalized-long-float setq +syn keyword lispFunc butlast least-negative-normalized-short-float set-syntax-from-char +syn keyword lispFunc byte least-negative-normalized-single-float seventh +syn keyword lispFunc byte-position least-negative-short-float shadow +syn keyword lispFunc byte-size least-negative-single-float shadowing-import +syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize +syn keyword lispFunc call-method least-positive-long-float shiftf +syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float +syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon +syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon +syn keyword lispFunc case least-positive-normalized-single-float short-site-name +syn keyword lispFunc catch least-positive-short-float signal +syn keyword lispFunc ccase least-positive-single-float signed-byte +syn keyword lispFunc cdr length signum +syn keyword lispFunc ceiling let simple-array +syn keyword lispFunc cell-error let* simple-base-string +syn keyword lispFunc cell-error-name lisp simple-bit-vector +syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector-p +syn keyword lispFunc change-class lisp-implementation-version simple-condition +syn keyword lispFunc char list simple-condition-format-arguments +syn keyword lispFunc char< list* simple-condition-format-control +syn keyword lispFunc char<= list-all-packages simple-error +syn keyword lispFunc char= listen simple-string +syn keyword lispFunc char> list-length simple-string-p +syn keyword lispFunc char>= listp simple-type-error +syn keyword lispFunc char/= load simple-vector +syn keyword lispFunc character load-logical-pathname-translations simple-vector-p +syn keyword lispFunc characterp load-time-value simple-warning +syn keyword lispFunc char-bit locally sin +syn keyword lispFunc char-bits log single-flaot-epsilon +syn keyword lispFunc char-bits-limit logand single-float +syn keyword lispFunc char-code logandc1 single-float-epsilon +syn keyword lispFunc char-code-limit logandc2 single-float-negative-epsilon +syn keyword lispFunc char-control-bit logbitp sinh +syn keyword lispFunc char-downcase logcount sixth +syn keyword lispFunc char-equal logeqv sleep +syn keyword lispFunc char-font logical-pathname slot-boundp +syn keyword lispFunc char-font-limit logical-pathname-translations slot-exists-p +syn keyword lispFunc char-greaterp logior slot-makunbound +syn keyword lispFunc char-hyper-bit lognand slot-missing +syn keyword lispFunc char-int lognor slot-unbound +syn keyword lispFunc char-lessp lognot slot-value +syn keyword lispFunc char-meta-bit logorc1 software-type +syn keyword lispFunc char-name logorc2 software-version +syn keyword lispFunc char-not-equal logtest some +syn keyword lispFunc char-not-greaterp logxor sort +syn keyword lispFunc char-not-lessp long-float space +syn keyword lispFunc char-super-bit long-float-epsilon special +syn keyword lispFunc char-upcase long-float-negative-epsilon special-form-p +syn keyword lispFunc check-type long-site-name special-operator-p +syn keyword lispFunc cis loop speed +syn keyword lispFunc class loop-finish sqrt +syn keyword lispFunc class-name lower-case-p stable-sort +syn keyword lispFunc class-of machine-instance standard +syn keyword lispFunc clear-input machine-type standard-char +syn keyword lispFunc clear-output machine-version standard-char-p +syn keyword lispFunc close macroexpand standard-class +syn keyword lispFunc clrhash macroexpand-1 standard-generic-function +syn keyword lispFunc code-char macroexpand-l standard-method +syn keyword lispFunc coerce macro-function standard-object +syn keyword lispFunc commonp macrolet step +syn keyword lispFunc compilation-speed make-array storage-condition +syn keyword lispFunc compile make-array store-value +syn keyword lispFunc compiled-function make-broadcast-stream stream +syn keyword lispFunc compiled-function-p make-char stream-element-type +syn keyword lispFunc compile-file make-concatenated-stream stream-error +syn keyword lispFunc compile-file-pathname make-condition stream-error-stream +syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format +syn keyword lispFunc compiler-macro make-echo-stream streamp +syn keyword lispFunc compiler-macro-function make-hash-table streamup +syn keyword lispFunc complement make-instance string +syn keyword lispFunc complex make-instances-obsolete string< +syn keyword lispFunc complexp make-list string<= +syn keyword lispFunc compute-applicable-methods make-load-form string= +syn keyword lispFunc compute-restarts make-load-form-saving-slots string> +syn keyword lispFunc concatenate make-method string>= +syn keyword lispFunc concatenated-stream make-package string/= +syn keyword lispFunc concatenated-stream-streams make-pathname string-capitalize +syn keyword lispFunc cond make-random-state string-char +syn keyword lispFunc condition make-sequence string-char-p +syn keyword lispFunc conjugate make-string string-downcase +syn keyword lispFunc cons make-string-input-stream string-equal +syn keyword lispFunc consp make-string-output-stream string-greaterp +syn keyword lispFunc constantly make-symbol string-left-trim +syn keyword lispFunc constantp make-synonym-stream string-lessp +syn keyword lispFunc continue make-two-way-stream string-not-equal +syn keyword lispFunc control-error makunbound string-not-greaterp +syn keyword lispFunc copy-alist map string-not-lessp +syn keyword lispFunc copy-list mapc stringp +syn keyword lispFunc copy-pprint-dispatch mapcan string-right-strim +syn keyword lispFunc copy-readtable mapcar string-right-trim +syn keyword lispFunc copy-seq mapcon string-stream +syn keyword lispFunc copy-structure maphash string-trim +syn keyword lispFunc copy-symbol map-into string-upcase +syn keyword lispFunc copy-tree mapl structure +syn keyword lispFunc cos maplist structure-class +syn keyword lispFunc cosh mask-field structure-object +syn keyword lispFunc count max style-warning +syn keyword lispFunc count-if member sublim +syn keyword lispFunc count-if-not member-if sublis +syn keyword lispFunc ctypecase member-if-not subseq +syn keyword lispFunc debug merge subsetp +syn keyword lispFunc decf merge-pathname subst +syn keyword lispFunc declaim merge-pathnames subst-if +syn keyword lispFunc declaration method subst-if-not +syn keyword lispFunc declare method-combination substitute +syn keyword lispFunc decode-float method-combination-error substitute-if +syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not +syn keyword lispFunc defclass min subtypep +syn keyword lispFunc defconstant minusp svref +syn keyword lispFunc defgeneric mismatch sxhash +syn keyword lispFunc define-compiler-macro mod symbol +syn keyword lispFunc define-condition most-negative-double-float symbol-function +syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet +syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name +syn keyword lispFunc define-setf-expander most-negative-short-float symbolp +syn keyword lispFunc define-setf-method most-negative-single-float symbol-package +syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-plist +syn keyword lispFunc defmacro most-positive-fixnum symbol-value +syn keyword lispFunc defmethod most-positive-long-float synonym-stream +syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol +syn keyword lispFunc defparameter most-positive-single-float sys +syn keyword lispFunc defsetf muffle-warning system +syn keyword lispFunc defstruct multiple-value-bind t +syn keyword lispFunc deftype multiple-value-call tagbody +syn keyword lispFunc defun multiple-value-list tailp +syn keyword lispFunc defvar multiple-value-prog1 tan +syn keyword lispFunc delete multiple-value-seteq tanh +syn keyword lispFunc delete-duplicates multiple-value-setq tenth +syn keyword lispFunc delete-file multiple-values-limit terpri +syn keyword lispFunc delete-if name-char the +syn keyword lispFunc delete-if-not namestring third +syn keyword lispFunc delete-package nbutlast throw +syn keyword lispFunc denominator nconc time +syn keyword lispFunc deposit-field next-method-p trace +syn keyword lispFunc describe nil translate-logical-pathname +syn keyword lispFunc describe-object nintersection translate-pathname +syn keyword lispFunc destructuring-bind ninth tree-equal +syn keyword lispFunc digit-char no-applicable-method truename +syn keyword lispFunc digit-char-p no-next-method truncase +syn keyword lispFunc directory not truncate +syn keyword lispFunc directory-namestring notany two-way-stream +syn keyword lispFunc disassemble notevery two-way-stream-input-stream +syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream +syn keyword lispFunc do nreconc type +syn keyword lispFunc do* nreverse typecase +syn keyword lispFunc do-all-symbols nset-difference type-error +syn keyword lispFunc documentation nset-exclusive-or type-error-datum +syn keyword lispFunc do-exeternal-symbols nstring type-error-expected-type +syn keyword lispFunc do-external-symbols nstring-capitalize type-of +syn keyword lispFunc dolist nstring-downcase typep +syn keyword lispFunc do-symbols nstring-upcase unbound-slot +syn keyword lispFunc dotimes nsublis unbound-slot-instance +syn keyword lispFunc double-float nsubst unbound-variable +syn keyword lispFunc double-float-epsilon nsubst-if undefined-function +syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport +syn keyword lispFunc dpb nsubstitute unintern +syn keyword lispFunc dribble nsubstitute-if union +syn keyword lispFunc dynamic-extent nsubstitute-if-not unless +syn keyword lispFunc ecase nth unread +syn keyword lispFunc echo-stream nthcdr unread-char +syn keyword lispFunc echo-stream-input-stream nth-value unsigned-byte +syn keyword lispFunc echo-stream-output-stream null untrace +syn keyword lispFunc ed number unuse-package +syn keyword lispFunc eighth numberp unwind-protect +syn keyword lispFunc elt numerator update-instance-for-different-class +syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class +syn keyword lispFunc end-of-file oddp upgraded-array-element-type +syn keyword lispFunc endp open upgraded-complex-part-type +syn keyword lispFunc enough-namestring open-stream-p upper-case-p +syn keyword lispFunc ensure-directories-exist optimize use-package +syn keyword lispFunc ensure-generic-function or user +syn keyword lispFunc eq otherwise user-homedir-pathname +syn keyword lispFunc eql output-stream-p use-value +syn keyword lispFunc equal package values +syn keyword lispFunc equalp package-error values-list +syn keyword lispFunc error package-error-package variable +syn keyword lispFunc etypecase package-name vector +syn keyword lispFunc eval package-nicknames vectorp +syn keyword lispFunc evalhook packagep vector-pop +syn keyword lispFunc eval-when package-shadowing-symbols vector-push +syn keyword lispFunc evenp package-used-by-list vector-push-extend +syn keyword lispFunc every package-use-list warn +syn keyword lispFunc exp pairlis warning +syn keyword lispFunc export parse-error when +syn keyword lispFunc expt parse-integer wild-pathname-p +syn keyword lispFunc extended-char parse-namestring with-accessors +syn keyword lispFunc fboundp pathname with-compilation-unit +syn keyword lispFunc fceiling pathname-device with-condition-restarts +syn keyword lispFunc fdefinition pathname-directory with-hash-table-iterator +syn keyword lispFunc ffloor pathname-host with-input-from-string +syn keyword lispFunc fifth pathname-match-p with-open-file +syn keyword lispFunc file-author pathname-name with-open-stream +syn keyword lispFunc file-error pathnamep with-output-to-string +syn keyword lispFunc file-error-pathname pathname-type with-package-iterator +syn keyword lispFunc file-length pathname-version with-simple-restart +syn keyword lispFunc file-namestring peek-char with-slots +syn keyword lispFunc file-position phase with-standard-io-syntax +syn keyword lispFunc file-stream pi write +syn keyword lispFunc file-string-length plusp write-byte +syn keyword lispFunc file-write-date pop write-char +syn keyword lispFunc fill position write-line +syn keyword lispFunc fill-pointer position-if write-sequence +syn keyword lispFunc find position-if-not write-string +syn keyword lispFunc find-all-symbols pprint write-to-string +syn keyword lispFunc find-class pprint-dispatch yes-or-no-p +syn keyword lispFunc find-if pprint-exit-if-list-exhausted y-or-n-p +syn keyword lispFunc find-if-not pprint-fill zerop syn match lispFunc "\<c[ad]\+r\>" if exists("g:lispsyntax_clisp") @@ -563,50 +563,50 @@ syn sync lines=100 " Define Highlighting: {{{1 if !exists("skip_lisp_syntax_inits") - hi def link lispCommentRegion lispComment + hi def link lispCommentRegion lispComment hi def link lispAtomNmbr lispNumber hi def link lispAtomMark lispMark hi def link lispInStringString lispString - hi def link lispAtom Identifier - hi def link lispAtomBarSymbol Special + hi def link lispAtom Identifier + hi def link lispAtomBarSymbol Special hi def link lispBarSymbol Special hi def link lispComment Comment hi def link lispConcat Statement - hi def link lispDecl Statement - hi def link lispFunc Statement - hi def link lispKey Type - hi def link lispMark Delimiter + hi def link lispDecl Statement + hi def link lispFunc Statement + hi def link lispKey Type + hi def link lispMark Delimiter hi def link lispNumber Number hi def link lispParenError Error - hi def link lispEscapeSpecial Type + hi def link lispEscapeSpecial Type hi def link lispString String - hi def link lispTodo Todo - hi def link lispVar Statement + hi def link lispTodo Todo + hi def link lispVar Statement if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 if &bg == "dark" - hi def hlLevel0 ctermfg=red guifg=red1 - hi def hlLevel1 ctermfg=yellow guifg=orange1 - hi def hlLevel2 ctermfg=green guifg=yellow1 - hi def hlLevel3 ctermfg=cyan guifg=greenyellow - hi def hlLevel4 ctermfg=magenta guifg=green1 - hi def hlLevel5 ctermfg=red guifg=springgreen1 - hi def hlLevel6 ctermfg=yellow guifg=cyan1 - hi def hlLevel7 ctermfg=green guifg=slateblue1 - hi def hlLevel8 ctermfg=cyan guifg=magenta1 - hi def hlLevel9 ctermfg=magenta guifg=purple1 + hi def hlLevel0 ctermfg=red guifg=red1 + hi def hlLevel1 ctermfg=yellow guifg=orange1 + hi def hlLevel2 ctermfg=green guifg=yellow1 + hi def hlLevel3 ctermfg=cyan guifg=greenyellow + hi def hlLevel4 ctermfg=magenta guifg=green1 + hi def hlLevel5 ctermfg=red guifg=springgreen1 + hi def hlLevel6 ctermfg=yellow guifg=cyan1 + hi def hlLevel7 ctermfg=green guifg=slateblue1 + hi def hlLevel8 ctermfg=cyan guifg=magenta1 + hi def hlLevel9 ctermfg=magenta guifg=purple1 else - hi def hlLevel0 ctermfg=red guifg=red3 - hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 - hi def hlLevel2 ctermfg=darkgreen guifg=orange2 - hi def hlLevel3 ctermfg=blue guifg=yellow3 - hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 - hi def hlLevel5 ctermfg=red guifg=green4 - hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 - hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 - hi def hlLevel8 ctermfg=blue guifg=darkslateblue - hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet + hi def hlLevel0 ctermfg=red guifg=red3 + hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 + hi def hlLevel2 ctermfg=darkgreen guifg=orange2 + hi def hlLevel3 ctermfg=blue guifg=yellow3 + hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 + hi def hlLevel5 ctermfg=red guifg=green4 + hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 + hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 + hi def hlLevel8 ctermfg=blue guifg=darkslateblue + hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet endif endif diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index 532f83d3bf..a7fe9ce925 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -2,7 +2,7 @@ " " Language: Logtalk " Maintainer: Paulo Moura <pmoura@logtalk.org> -" Last Change: February 4, 2012 +" Last Change: August 3, 2018 " quit when a syntax file was already loaded @@ -79,13 +79,13 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=log syn match logtalkDirTag ":- else\." syn match logtalkDirTag ":- endif\." syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- built_in\." syn match logtalkDirTag ":- dynamic\." syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL @@ -131,17 +131,20 @@ syn match logtalkBuiltIn "\<\(instantiat\|specializ\)es_class\ze(" syn match logtalkBuiltIn "\<\(abolish\|define\)_events\ze(" syn match logtalkBuiltIn "\<current_event\ze(" -syn match logtalkBuiltIn "\<\(curren\|se\)t_logtalk_flag\ze(" +syn match logtalkBuiltIn "\<\(create\|current\|set\)_logtalk_flag\ze(" -syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\)\ze(" +syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\|make\(_target_action\)\?\)\ze(" +syn match logtalkBuiltIn "\<logtalk_make\>" syn match logtalkBuiltIn "\<\(for\|retract\)all\ze(" syn match logtalkBuiltIn "\<threaded\(_\(call\|once\|ignore\|exit\|peek\|wait\|notify\)\)\?\ze(" +syn match logtalkBuiltIn "\<threaded_engine\(_\(create\|destroy\|self\|next\|next_reified\|yield\|post\|fetch\)\)\?\ze(" " Logtalk built-in methods +syn match logtalkBuiltInMethod "\<context\ze(" syn match logtalkBuiltInMethod "\<parameter\ze(" syn match logtalkBuiltInMethod "\<se\(lf\|nder\)\ze(" syn match logtalkBuiltInMethod "\<this\ze(" @@ -159,6 +162,8 @@ syn match logtalkBuiltInMethod "\<f\(ind\|or\)all\ze(" syn match logtalkBuiltInMethod "\<before\ze(" syn match logtalkBuiltInMethod "\<after\ze(" +syn match logtalkBuiltInMethod "\<forward\ze(" + syn match logtalkBuiltInMethod "\<expand_\(goal\|term\)\ze(" syn match logtalkBuiltInMethod "\<\(goal\|term\)_expansion\ze(" syn match logtalkBuiltInMethod "\<phrase\ze(" @@ -174,6 +179,7 @@ syn match logtalkOperator "@" syn match logtalkKeyword "\<true\>" syn match logtalkKeyword "\<fail\>" +syn match logtalkKeyword "\<false\>" syn match logtalkKeyword "\<ca\(ll\|tch\)\ze(" syn match logtalkOperator "!" " syn match logtalkOperator "," @@ -181,11 +187,14 @@ syn match logtalkOperator ";" syn match logtalkOperator "-->" syn match logtalkOperator "->" syn match logtalkKeyword "\<throw\ze(" +syn match logtalkKeyword "\<\(instantiation\|system\)_error\>" +syn match logtalkKeyword "\<\(type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze(" " Term unification syn match logtalkOperator "=" +syn match logtalkKeyword "\<subsumes_term\ze(" syn match logtalkKeyword "\<unify_with_occurs_check\ze(" syn match logtalkOperator "\\=" @@ -199,6 +208,7 @@ syn match logtalkKeyword "\<float\ze(" syn match logtalkKeyword "\<c\(allable\|ompound\)\ze(" syn match logtalkKeyword "\<n\(onvar\|umber\)\ze(" syn match logtalkKeyword "\<ground\ze(" +syn match logtalkKeyword "\<acyclic_term\ze(" " Term comparison @@ -219,14 +229,20 @@ syn match logtalkKeyword "\<arg\ze(" syn match logtalkOperator "=\.\." syn match logtalkKeyword "\<copy_term\ze(" syn match logtalkKeyword "\<numbervars\ze(" +syn match logtalkKeyword "\<term_variables\ze(" + + +" Predicate aliases + +syn match logtalkOperator "\<as\>" -" Arithemtic evaluation +" Arithmetic evaluation syn match logtalkOperator "\<is\>" -" Arithemtic comparison +" Arithmetic comparison syn match logtalkOperator "=:=" syn match logtalkOperator "=\\=" @@ -299,16 +315,18 @@ syn match logtalkOperator "-" syn match logtalkOperator "\*" syn match logtalkOperator "//" syn match logtalkOperator "/" +syn match logtalkKeyword "\<div\ze(" syn match logtalkKeyword "\<r\(ound\|em\)\ze(" syn match logtalkKeyword "\<e\>" syn match logtalkKeyword "\<pi\>" +syn match logtalkKeyword "\<div\>" syn match logtalkKeyword "\<rem\>" -syn match logtalkKeyword "\<mod\ze(" +syn match logtalkKeyword "\<m\(ax\|in\|od\)\ze(" syn match logtalkKeyword "\<mod\>" syn match logtalkKeyword "\<abs\ze(" syn match logtalkKeyword "\<sign\ze(" syn match logtalkKeyword "\<flo\(or\|at\(_\(integer\|fractional\)_part\)\?\)\ze(" -syn match logtalkKeyword "\<truncate\ze(" +syn match logtalkKeyword "\<t\(an\|runcate\)\ze(" syn match logtalkKeyword "\<ceiling\ze(" @@ -317,7 +335,7 @@ syn match logtalkKeyword "\<ceiling\ze(" syn match logtalkOperator "\*\*" syn match logtalkKeyword "\<s\(in\|qrt\)\ze(" syn match logtalkKeyword "\<cos\ze(" -syn match logtalkKeyword "\<atan\ze(" +syn match logtalkKeyword "\<a\(cos\|sin\|tan\|tan2\)\ze(" syn match logtalkKeyword "\<exp\ze(" syn match logtalkKeyword "\<log\ze(" @@ -329,6 +347,7 @@ syn match logtalkOperator "<<" syn match logtalkOperator "/\\" syn match logtalkOperator "\\/" syn match logtalkOperator "\\" +syn match logtalkKeyword "\<xor\ze(" " Logtalk list operator @@ -347,7 +366,7 @@ syn match logtalkNumber "\<\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+\>" syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" -syn match logtalkNumber "\<0'.\|0''\|0'\"\>" +syn match logtalkNumber "\<0'[\\]\?.\|0''\|0'\"\>" syn match logtalkNumber "\<0b[0-1]\+\>" syn match logtalkNumber "\<0o\o\+\>" syn match logtalkNumber "\<0x\x\+\>" diff --git a/runtime/syntax/mix.vim b/runtime/syntax/mix.vim index 9ab98eacf8..564d344cc8 100644 --- a/runtime/syntax/mix.vim +++ b/runtime/syntax/mix.vim @@ -2,7 +2,7 @@ " Language: MIX (Donald Knuth's assembly language used in TAOCP) " Maintainer: Wu Yongwei <wuyongwei@gmail.com> " Filenames: *.mixal *.mix -" Last Change: 2013 Nov 13 +" Last Change: 2017-11-26 15:21:36 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -16,7 +16,7 @@ syn case ignore " Special processing of ALF directive: implementations vary whether quotation " marks are needed -syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained +syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixString nextgroup=mixEndComment contained " Region for parameters syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained @@ -46,6 +46,7 @@ syn keyword mixDirective ALF nextgroup=mixAlfParam contained " Opcodes syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite +syn keyword mixOpcode SLB SRB JAE JAO JXE JXO nextgroup=mixParam contained skipwhite syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite @@ -58,7 +59,7 @@ syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite " Switch back to being case sensitive syn case match -" Registers (only to used in comments now) +" Registers (only to be used in comments now) syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained " The default highlighting diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index e4395fdf59..830664e0eb 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -2,9 +2,9 @@ " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net> -" Last Change: 18 August 2016 +" Last Change: 21 May 2018 -" This file covers mutt version 1.7.0 +" This file covers mutt version 1.10.0 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -104,142 +104,175 @@ syn match muttrcKeyName contained "<F[0-9]\+>" syn keyword muttrcVarBool skipwhite contained \ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split \ auto_tag autoedit beep beep_new bounce_delivered braille_friendly - \ check_mbox_size check_new collapse_unread confirmappend confirmcreate - \ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime - \ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt - \ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme - \ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs - \ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to - \ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt - \ forward_quote hdrs header help hidden_host hide_limited hide_missing - \ hide_thread_subject hide_top_limited hide_top_missing honor_disposition - \ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to - \ imap_check_subscribed imap_list_subscribed imap_passive imap_peek - \ imap_servernoise implicit_autoview include_onlyfirst keep_flagged + \ browser_abbreviate_mailboxes change_folder_next check_mbox_size check_new + \ collapse_unread confirmappend confirmcreate crypt_autoencrypt crypt_autopgp + \ crypt_autosign crypt_autosmime crypt_confirmhook crypt_opportunistic_encrypt + \ crypt_replyencrypt crypt_replysign crypt_replysignencrypted crypt_timestamp + \ crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads + \ edit_hdrs edit_headers encode_from envelope_from fast_reply fcc_clear + \ flag_safe followup_to force_name forw_decode forw_decrypt forw_quote + \ forward_decode forward_decrypt forward_quote hdrs header + \ header_color_partial help hidden_host hide_limited hide_missing + \ hide_thread_subject hide_top_limited hide_top_missing history_remove_dups + \ honor_disposition idn_decode idn_encode ignore_linear_white_space + \ ignore_list_reply_to imap_check_subscribed imap_list_subscribed imap_passive + \ imap_peek imap_servernoise implicit_autoview include_onlyfirst keep_flagged \ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur \ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off \ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode - \ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt - \ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional - \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign - \ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc - \ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last - \ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after - \ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve - \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name - \ reverse_realname rfc2047_parameters save_address save_empty save_name score - \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap - \ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top - \ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default - \ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1 - \ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime - \ strict_threads suspend text_flowed thorough_search thread_received tilde - \ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from - \ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc + \ mime_type_query_first narrow_tree pager_stop pgp_auto_decode + \ pgp_auto_traditional pgp_autoencrypt pgp_autoinline pgp_autosign + \ pgp_check_exit pgp_create_traditional pgp_ignore_subkeys pgp_long_ids + \ pgp_replyencrypt pgp_replyinline pgp_replysign pgp_replysignencrypted + \ pgp_retainable_sigs pgp_self_encrypt pgp_self_encrypt_as pgp_show_unusable + \ pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all + \ pop_last postpone_encrypt postpone_encrypt_as print_decode print_split + \ prompt_after read_only reflow_space_quotes reflow_text reflow_wrap + \ reply_self resolve resume_draft_files resume_edited_draft_files + \ reverse_alias reverse_name reverse_realname rfc2047_parameters save_address + \ save_empty save_name score sidebar_folder_indent sidebar_new_mail_only + \ sidebar_next_new_wrap sidebar_short_path sidebar_sort sidebar_visible + \ sig_dashes sig_on_top smart_wrap smime_ask_cert_label + \ smime_decrypt_use_default_key smime_is_default smime_self_encrypt + \ smime_self_encrypt_as sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 + \ ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host + \ ssl_verify_partial_chains status_on_top strict_mime strict_threads suspend + \ text_flowed thorough_search thread_received tilde ts_enabled uncollapse_jump + \ use_8bitmime use_domain use_envelope_from use_from use_idn use_ipv6 + \ uncollapse_new user_agent wait_key weed wrap_search write_bcc \ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained - \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split - \ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly - \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate - \ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime - \ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt - \ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme - \ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs - \ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to - \ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt - \ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing - \ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition - \ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to - \ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek - \ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged - \ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur - \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off - \ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode - \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt + \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc + \ noattach_split noauto_tag noautoedit nobeep nobeep_new nobounce_delivered + \ nobraille_friendly nobrowser_abbreviate_mailboxes nochange_folder_next + \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend + \ noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign + \ nocrypt_autosmime nocrypt_confirmhook nocrypt_opportunistic_encrypt + \ nocrypt_replyencrypt nocrypt_replysign nocrypt_replysignencrypted + \ nocrypt_timestamp nocrypt_use_gpgme nocrypt_use_pka nodelete_untag + \ nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers + \ noencode_from noenvelope_from nofast_reply nofcc_clear noflag_safe + \ nofollowup_to noforce_name noforw_decode noforw_decrypt noforw_quote + \ noforward_decode noforward_decrypt noforward_quote nohdrs noheader + \ noheader_color_partial nohelp nohidden_host nohide_limited nohide_missing + \ nohide_thread_subject nohide_top_limited nohide_top_missing + \ nohistory_remove_dups nohonor_disposition noidn_decode noidn_encode + \ noignore_linear_white_space noignore_list_reply_to noimap_check_subscribed + \ noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise + \ noimplicit_autoview noinclude_onlyfirst nokeep_flagged nomail_check_recent + \ nomail_check_stats nomailcap_sanitize nomaildir_check_cur + \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers + \ nomenu_move_off nomenu_scroll nomessage_cache_clean nometa_key nometoo + \ nomh_purge nomime_forward_decode nomime_type_query_first nonarrow_tree + \ nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt \ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional - \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign - \ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc - \ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last - \ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after - \ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve - \ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name - \ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore - \ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap - \ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top - \ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default - \ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 - \ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime - \ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde - \ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from - \ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc + \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline + \ nopgp_replysign nopgp_replysignencrypted nopgp_retainable_sigs + \ nopgp_self_encrypt nopgp_self_encrypt_as nopgp_show_unusable + \ nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split + \ nopop_auth_try_all nopop_last nopostpone_encrypt nopostpone_encrypt_as + \ noprint_decode noprint_split noprompt_after noread_only + \ noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve + \ noresume_draft_files noresume_edited_draft_files noreverse_alias + \ noreverse_name noreverse_realname norfc2047_parameters nosave_address + \ nosave_empty nosave_name noscore nosidebar_folder_indent + \ nosidebar_new_mail_only nosidebar_next_new_wrap nosidebar_short_path + \ nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top nosmart_wrap + \ nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default + \ nosmime_self_encrypt nosmime_self_encrypt_as nosort_re nossl_force_tls + \ nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts + \ nossl_verify_dates nossl_verify_host nossl_verify_partial_chains + \ nostatus_on_top nostrict_mime nostrict_threads nosuspend notext_flowed + \ nothorough_search nothread_received notilde nots_enabled nouncollapse_jump + \ nouse_8bitmime nouse_domain nouse_envelope_from nouse_from nouse_idn + \ nouse_ipv6 nouncollapse_new nouser_agent nowait_key noweed nowrap_search + \ nowrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained - \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split - \ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly - \ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate - \ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime - \ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt - \ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme - \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs - \ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to - \ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt - \ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing - \ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition - \ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to - \ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek - \ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged - \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur - \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off - \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode - \ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt - \ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional - \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign - \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc - \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last - \ invpostpone_encrypt invpostpone_encrypt_as invprint_decode invprint_split invprompt_after - \ invread_only invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve - \ invresume_draft_files invresume_edited_draft_files invreverse_alias invreverse_name - \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty invsave_name invscore - \ invsidebar_folder_indent invsidebar_new_mail_only invsidebar_next_new_wrap - \ invsidebar_short_path invsidebar_sort invsidebar_visible invsig_dashes invsig_on_top - \ invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default - \ invsort_re invssl_force_tls invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 - \ invssl_usesystemcerts invssl_verify_dates invssl_verify_host invstatus_on_top invstrict_mime - \ invstrict_threads invsuspend invtext_flowed invthorough_search invthread_received invtilde - \ invts_enabled invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from invuse_from - \ invuse_idn invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc + \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc + \ invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new + \ invbounce_delivered invbraille_friendly invbrowser_abbreviate_mailboxes + \ invchange_folder_next invcheck_mbox_size invcheck_new invcollapse_unread + \ invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp + \ invcrypt_autosign invcrypt_autosmime invcrypt_confirmhook + \ invcrypt_opportunistic_encrypt invcrypt_replyencrypt invcrypt_replysign + \ invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme + \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads + \ invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply + \ invfcc_clear invflag_safe invfollowup_to invforce_name invforw_decode + \ invforw_decrypt invforw_quote invforward_decode invforward_decrypt + \ invforward_quote invhdrs invheader invheader_color_partial invhelp + \ invhidden_host invhide_limited invhide_missing invhide_thread_subject + \ invhide_top_limited invhide_top_missing invhistory_remove_dups + \ invhonor_disposition invidn_decode invidn_encode + \ invignore_linear_white_space invignore_list_reply_to + \ invimap_check_subscribed invimap_list_subscribed invimap_passive + \ invimap_peek invimap_servernoise invimplicit_autoview invinclude_onlyfirst + \ invkeep_flagged invmail_check_recent invmail_check_stats invmailcap_sanitize + \ invmaildir_check_cur invmaildir_header_cache_verify invmaildir_trash + \ invmark_old invmarkers invmenu_move_off invmenu_scroll + \ invmessage_cache_clean invmeta_key invmetoo invmh_purge + \ invmime_forward_decode invmime_type_query_first invnarrow_tree invpager_stop + \ invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt + \ invpgp_autoinline invpgp_autosign invpgp_check_exit + \ invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids + \ invpgp_replyencrypt invpgp_replyinline invpgp_replysign + \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_self_encrypt + \ invpgp_self_encrypt_as invpgp_show_unusable invpgp_strict_enc + \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all + \ invpop_last invpostpone_encrypt invpostpone_encrypt_as invprint_decode + \ invprint_split invprompt_after invread_only invreflow_space_quotes + \ invreflow_text invreflow_wrap invreply_self invresolve invresume_draft_files + \ invresume_edited_draft_files invreverse_alias invreverse_name + \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty + \ invsave_name invscore invsidebar_folder_indent invsidebar_new_mail_only + \ invsidebar_next_new_wrap invsidebar_short_path invsidebar_sort + \ invsidebar_visible invsig_dashes invsig_on_top invsmart_wrap + \ invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default + \ invsmime_self_encrypt invsmime_self_encrypt_as invsort_re invssl_force_tls + \ invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts + \ invssl_verify_dates invssl_verify_host invssl_verify_partial_chains + \ invstatus_on_top invstrict_mime invstrict_threads invsuspend invtext_flowed + \ invthorough_search invthread_received invtilde invts_enabled + \ invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from + \ invuse_from invuse_idn invuse_ipv6 invuncollapse_new invuser_agent + \ invwait_key invweed invwrap_search invwrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ abort_nosubject abort_unmodified bounce copy crypt_verify_sig delete - \ fcc_attach forward_edit honor_followup_to include mime_forward + \ abort_nosubject abort_unmodified abort_noattach bounce copy crypt_verify_sig + \ delete fcc_attach forward_edit honor_followup_to include mime_forward \ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete \ pop_reconnect postpone print quit recall reply_to ssl_starttls \ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ noabort_nosubject noabort_unmodified nobounce nocopy nocrypt_verify_sig nodelete - \ nofcc_attach noforward_edit nohonor_followup_to noinclude nomime_forward - \ nomime_forward_rest nomime_fwd nomove nopgp_mime_auto nopgp_verify_sig nopop_delete - \ nopop_reconnect nopostpone noprint noquit norecall noreply_to nossl_starttls + \ noabort_nosubject noabort_unmodified noabort_noattach nobounce nocopy + \ nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to + \ noinclude nomime_forward nomime_forward_rest nomime_fwd nomove + \ nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nopostpone + \ noprint noquit norecall noreply_to nossl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ invabort_nosubject invabort_unmodified invbounce invcopy invcrypt_verify_sig invdelete - \ invfcc_attach invforward_edit invhonor_followup_to invinclude invmime_forward - \ invmime_forward_rest invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete - \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to invssl_starttls + \ invabort_nosubject invabort_unmodified invabort_noattach invbounce invcopy + \ invcrypt_verify_sig invdelete invfcc_attach invforward_edit + \ invhonor_followup_to invinclude invmime_forward invmime_forward_rest + \ invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete + \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to + \ invssl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained - \ connect_timeout history imap_keepalive imap_pipeline_depth mail_check - \ mail_check_stats_interval menu_context net_inc pager_context pager_index_lines - \ pgp_timeout pop_checkinterval read_inc save_history score_threshold_delete - \ score_threshold_flag score_threshold_read search_context sendmail_wait - \ sidebar_width sleep_time smime_timeout ssl_min_dh_prime_bits time_inc timeout - \ wrap wrap_headers wrapmargin write_inc + \ connect_timeout error_history history imap_keepalive imap_pipeline_depth + \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc + \ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc + \ save_history score_threshold_delete score_threshold_flag + \ score_threshold_read search_context sendmail_wait sidebar_width sleep_time + \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers + \ wrapmargin write_inc \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcFormatErrors contained /%./ @@ -284,7 +317,7 @@ syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\ syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from mutt_attach_fmt in recvattach.c -syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ +syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdeFfImMnQstTuX%]/ syn match muttrcAttachFormatEscapes contained /%[>|*]./ syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2 syn match muttrcFormatConditionals2 contained /[^?]*?/ @@ -308,7 +341,7 @@ syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/ syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/ syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from status_format_str in status.c -syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/ +syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPRrsStuvV%]/ syn match muttrcStatusFormatEscapes contained /%[>|*]./ syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2 " This matches the documentation, but directly contradicts the code @@ -357,27 +390,27 @@ syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad, syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite - \ alias_file assumed_charset attach_charset attach_sep certificate_file charset - \ config_charset content_type default_hook display_filter dotlock_program - \ dsn_notify dsn_return editor entropy_file envelope_from_address escape folder - \ forw_format forward_format from gecos_mask hdr_format header_cache - \ header_cache_compress header_cache_pagesize history_file hostname - \ imap_authenticators imap_delim_chars imap_headers imap_idle imap_login - \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path mask - \ mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied mh_seq_unseen - \ mixmaster msg_format pager pgp_decryption_okay pgp_good_sign - \ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as - \ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user - \ post_indent_str post_indent_string postpone_encrypt_as postponed preconnect - \ print_cmd print_command query_command quote_regexp realname record - \ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars - \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method - \ signature simple_search smileys smime_ca_location smime_certificates - \ smime_default_key smime_encrypt_with smime_keys smime_sign_as - \ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url sort sort_alias - \ sort_aux sort_browser spam_separator spoolfile ssl_ca_certificates_file - \ ssl_ciphers ssl_client_cert status_chars tmpdir to_chars trash ts_icon_format - \ ts_status_format tunnel visual + \ abort_noattach_regexp alias_file assumed_charset attach_charset attach_sep + \ attribution_locale certificate_file charset config_charset content_type + \ default_hook display_filter dotlock_program dsn_notify dsn_return editor + \ entropy_file envelope_from_address escape folder forw_format + \ forward_attribution_intro forward_attribution_trailer forward_format from gecos_mask + \ hdr_format header_cache header_cache_compress header_cache_pagesize history_file + \ hostname imap_authenticators imap_delim_chars imap_headers imap_idle imap_login + \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path + \ mark_macro_prefix mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied + \ mh_seq_unseen mime_type_query_command mixmaster msg_format new_mail_command pager + \ pgp_default_key pgp_decryption_okay pgp_good_sign pgp_mime_signature_description + \ pgp_mime_signature_filename pgp_sign_as pgp_sort_keys pipe_sep pop_authenticators + \ pop_host pop_pass pop_user post_indent_str post_indent_string postpone_encrypt_as + \ postponed preconnect print_cmd print_command query_command quote_regexp realname + \ record reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars + \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method + \ signature simple_search smileys smime_ca_location smime_certificates + \ smime_default_key smime_encrypt_with smime_keys smime_sign_as smime_sign_digest_alg + \ smtp_authenticators smtp_pass smtp_url sort sort_alias sort_aux sort_browser + \ spam_separator spoolfile ssl_ca_certificates_file ssl_ciphers ssl_client_cert + \ status_chars tmpdir to_chars trash ts_icon_format ts_status_format tunnel visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Present in 1.4.2.1 (pgp_create_traditional was a bool then) @@ -396,6 +429,7 @@ syn keyword muttrcCommand skipwhite \ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source \ unalternative_order unalternative_order unauto_view ungroup unhdr_order \ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore + \ unsidebar_whitelist syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks @@ -430,7 +464,7 @@ syn match muttrcVariableInner contained "\$[a-zA-Z_-]\+" syn match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+" syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail -syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" +syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|mark\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|root\|save\|send\|tag\|undelete\)-message\>" syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>" syn match muttrcFunction contained "\<link-threads\>" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" @@ -442,10 +476,12 @@ syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>" syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>" syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>" syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>" -syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|mime\|reply-to\|subject\|to\|type\)\)\?\>" +syn match muttrcFunction contained "\<echo\>" +syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|label\|mime\|reply-to\|subject\|to\|type\)\)\?\>" syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>" +syn match muttrcFunction contained "\<error-history\>" syn match muttrcFunction contained "\<half-\%(up\|down\)\>" -syn match muttrcFunction contained "\<history-\%(up\|down\)\>" +syn match muttrcFunction contained "\<history-\%(up\|down\|search\)\>" syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>" syn match muttrcFunction contained "\<next-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\|unread-mailbox\)\>" syn match muttrcFunction contained "\<previous-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\)\>" @@ -458,6 +494,9 @@ syn match muttrcFunction contained "\<sidebar-\%(next\|next-new\|open\|page-down syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>" syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>" syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>" +syn match muttrcFunction contained "\<rename-attachment\>" +syn match muttrcFunction contained "\<subjectrx\>" +syn match muttrcFunction contained "\<\%(un\)\?setenv\>" syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>" syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" syn keyword muttrcFunction contained imap-logout-all @@ -559,6 +598,7 @@ syn match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,mutt syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat +syn region muttrcPattern contained keepend skipwhite start=+[~][<>](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[.]/ syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas diff --git a/runtime/syntax/neomuttrc.vim b/runtime/syntax/neomuttrc.vim index ea9d1f0885..7ff89879d9 100644 --- a/runtime/syntax/neomuttrc.vim +++ b/runtime/syntax/neomuttrc.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: NeoMutt setup files " Maintainer: Guillaume Brogi <gui-gui@netcourrier.com> -" Last Change: 2017 Oct 28 +" Last Change: 2018-03-25 " Original version based on syntax/muttrc.vim -" This file covers NeoMutt 20170912 +" This file covers NeoMutt 2018-03-23 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -134,7 +134,7 @@ syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip " Format escapes and conditionals syntax match muttrcFormatConditionals2 contained /[^?]*?/ -function s:escapesConditionals(baseName, sequence, alignment, secondary) +function! s:escapesConditionals(baseName, sequence, alignment, secondary) exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/' if a:alignment exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./' @@ -146,43 +146,40 @@ function s:escapesConditionals(baseName, sequence, alignment, secondary) endif endfunction -" flatcap compiled a list of formats here: https://pastebin.com/raw/5QXhiP6L -" UPDATE -" The following info was pulled from hdr_format_str in hdrline.c -call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) -" The following info was pulled from alias_format_str in addrbook.c +" CHECKED 2018-04-18 +" Ref: index_format_str() in hdrline.c +call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqRrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) +" Ref: alias_format_str() in addrbook.c syntax match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ -" The following info was pulled from newsgroup_format_str in browser.c +" Ref: group_index_format_str() in browser.c call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1) -" The following info was pulled from cb_format_str in sidebar.c +" Ref: sidebar_format_str() in sidebar.c call s:escapesConditionals('SidebarFormat', '[BdFLNnSt!]', 1, 1) -" The following info was pulled from query_format_str in query.c +" Ref: query_format_str() in query.c call s:escapesConditionals('QueryFormat', '[acent]', 0, 1) -" The following info was pulled from mutt_attach_fmt in recvattach.c +" Ref: attach_format_str() in recvattach.c call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1) -" The following info was pulled from compose_format_str in compose.c +" Ref: compose_format_str() in compose.c syntax match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ syntax match muttrcComposeFormatEscapes contained /%[>|*]./ -" The following info was pulled from folder_format_str in browser.c -call s:escapesConditionals('FolderFormat', '[CDdfFglNstu]', 1, 0) -" The following info was pulled from mix_entry_fmt in remailer.c +" Ref: folder_format_str() in browser.c +call s:escapesConditionals('FolderFormat', '[CDdFfglmNnstu]', 1, 0) +" Ref: mix_format_str() in remailer.c call s:escapesConditionals('MixFormat', '[acns]', 0, 0) -" The following info was pulled from crypt_entry_fmt in crypt-gpgme.c -" and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports -" 'p', but pgp_entry_fmt does not). +" Ref: status_format_str() in status.c +call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPpRrSstuVv]', 1, 1) +" Ref: fmt_smime_command() in ncrypt/smime.c +call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) +" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c +" Ref: pgp_entry_fmt() in ncrypt/pgpkey.c +" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not call s:escapesConditionals('PGPFormat', '[acfklnptu[]', 0, 0) -" The following info was pulled from _mutt_fmt_pgp_command in -" pgpinvoke.c +" Ref: fmt_pgp_command() ncrypt/pgpinvoke.c call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1) -" The following info was pulled from status_format_str in status.c -call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPprSstuVu]', 1, 1) -" This matches the documentation, but directly contradicts the code -" (according to the code, this should be identical to the -" muttrcPGPCmdFormatEscapes + +" This matches the documentation, but directly contradicts the code +" (according to the code, this should be identical to the muttrcPGPCmdFormatEscapes syntax match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acfklntu[%]/ -" The following info was pulled from _mutt_fmt_smime_command in -" smime.c -call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes @@ -190,36 +187,36 @@ syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrf syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes -syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr -syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr -syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr -syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr -syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr -syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr -syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr -syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr -syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr -syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr -syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr -syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr +syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr +syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr +syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr +syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr +syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr +syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr +syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr +syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr +syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr syntax match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr -syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr -syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr +syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr +syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr +syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr +syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr +syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of the different screens in mutt -" UPDATE -syntax keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic +syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu syntax match muttrcMenuCommas /,/ contained +" CHECKED 2018-04-18 " List of hooks in Commands in init.h -" UPDATE syntax keyword muttrcHooks contained skipwhite - \ account-hook append-hook charset-hook - \ close-hook crypt-hook fcc-hook fcc-save-hook folder-hook iconv-hook mbox-hook - \ message-hook open-hook pgp-hook reply-hook save-hook send-hook send2-hook + \ account-hook append-hook close-hook crypt-hook fcc-hook fcc-save-hook + \ folder-hook iconv-hook mbox-hook message-hook open-hook pgp-hook + \ reply-hook save-hook send-hook send2-hook syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL @@ -375,28 +372,29 @@ syntax keyword muttrcMonoAttrib contained bold none normal reverse standout unde syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono +" CHECKED 2018-04-18 " List of fields in Fields in color.c -" UPDATE -syntax keyword muttrcColorField skipwhite contained - \ attach_headers attachment bold error hdrdefault index_author index_collapsed - \ index_date index_label index_number index_size index_subject index_tags - \ indicator markers message normal progress prompt quoted search sidebar_divider +syntax keyword muttrcColorField skipwhite contained + \ attachment attach_headers body bold error hdrdefault header index + \ index_author index_collapsed index_date index_flags index_label + \ index_number index_size index_subject index_tag index_tags indicator + \ markers message normal progress prompt quoted search sidebar_divider \ sidebar_flagged sidebar_highlight sidebar_indicator sidebar_new \ sidebar_ordinary sidebar_spoolfile signature status tilde tree underline - \ body header index index_flags index_tag \ nextgroup=muttrcColor syntax match muttrcColorField contained "\<quoted\d\=\>" syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField + +" CHECKED 2018-04-18 " List of fields in ComposeFields in color.c -" UPDATE syntax keyword muttrcColorComposeField skipwhite contained - \ header security_encrypt security_sign security_both security_none + \ header security_both security_encrypt security_none security_sign \ nextgroup=muttrcColorFG,muttrcColorFGNL syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace -function s:boolQuadGen(type, vars, deprecated) +function! s:boolQuadGen(type, vars, deprecated) let l:novars = copy(a:vars) call map(l:novars, '"no" . v:val') let l:invvars = copy(a:vars) @@ -414,104 +412,107 @@ function s:boolQuadGen(type, vars, deprecated) exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' endfunction +" CHECKED 2018-04-18 " List of DT_BOOL in MuttVars in init.h -" UPDATE call s:boolQuadGen('Bool', [ - \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', 'askcc', - \ 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', 'auto_tag', - \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', 'check_mbox_size', - \ 'check_new', 'collapse_all', 'collapse_flagged', 'collapse_unread', - \ 'confirmappend', 'confirmcreate', 'crypt_autoencrypt', 'crypt_autopgp', - \ 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook', - \ 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', 'crypt_replysign', - \ 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme', - \ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', - \ 'edit_headers', 'encode_from', 'fast_reply', 'fcc_clear', 'flag_safe', - \ 'followup_to', 'force_name', 'forward_decode', 'forward_decrypt', - \ 'forward_quote', 'forward_references', 'hdrs', 'header', - \ 'header_cache_compress', 'header_color_partial', 'help', 'hidden_host', - \ 'hide_limited', 'hide_missing', 'hide_thread_subject', 'hide_top_limited', - \ 'hide_top_missing', 'history_remove_dups', 'honor_disposition', 'idn_decode', - \ 'idn_encode', 'ignore_linear_white_space', 'ignore_list_reply_to', - \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', 'imap_passive', - \ 'imap_peek', 'imap_servernoise', 'implicit_autoview', 'include_onlyfirst', - \ 'keep_flagged', 'keywords_legacy', 'keywords_standard', 'mailcap_sanitize', - \ 'mail_check_recent', 'mail_check_stats', 'maildir_check_cur', - \ 'maildir_header_cache_verify', 'maildir_trash', 'markers', 'mark_old', - \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', 'metoo', - \ 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first', - \ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', - \ 'pager_stop', 'pgp_auto_decode', 'pgp_autoinline', 'pgp_check_exit', - \ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', - \ 'pgp_retainable_sigs', 'pgp_self_encrypt', 'pgp_show_unusable', - \ 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', 'pipe_split', - \ 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', 'print_decode', - \ 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes', - \ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', - \ 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias', - \ 'reverse_name', 'reverse_realname', 'rfc2047_parameters', 'save_address', - \ 'save_empty', 'save_name', 'save_unsubscribed', 'score', 'show_new_news', - \ 'show_only_unread', 'sidebar_folder_indent', 'sidebar_new_mail_only', - \ 'sidebar_next_new_wrap', 'sidebar_on_right', 'sidebar_short_path', - \ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'smart_wrap', - \ 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default', - \ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_use_sslv2', - \ 'ssl_use_sslv3', 'ssl_usesystemcerts', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', - \ 'ssl_use_tlsv1_2', 'ssl_verify_dates', 'ssl_verify_host', - \ 'ssl_verify_partial_chains', 'status_on_top', 'strict_threads', 'suspend', - \ 'text_flowed', 'thorough_search', 'thread_received', 'tilde', 'ts_enabled', - \ 'uncollapse_jump', 'uncollapse_new', 'use_8bitmime', 'use_domain', - \ 'use_envelope_from', 'use_from', 'use_ipv6', 'user_agent', - \ 'virtual_spoolfile', 'wait_key', 'weed', 'wrap_search', 'write_bcc', - \ 'x_comment_to' + \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', + \ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', + \ 'auto_tag', 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', + \ 'change_folder_next', 'check_mbox_size', 'check_new', 'collapse_all', + \ 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate', + \ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', + \ 'crypt_confirmhook', 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', + \ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', + \ 'crypt_use_gpgme', 'crypt_use_pka', 'delete_untag', 'digest_collapse', + \ 'duplicate_threads', 'edit_headers', 'encode_from', 'fast_reply', + \ 'fcc_clear', 'flag_safe', 'followup_to', 'force_name', 'forward_decode', + \ 'forward_decrypt', 'forward_quote', 'forward_references', 'hdrs', + \ 'header', 'header_cache_compress', 'header_color_partial', 'help', + \ 'hidden_host', 'hide_limited', 'hide_missing', 'hide_thread_subject', + \ 'hide_top_limited', 'hide_top_missing', 'history_remove_dups', + \ 'honor_disposition', 'idn_decode', 'idn_encode', 'ignore_list_reply_to', + \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', + \ 'imap_passive', 'imap_peek', 'imap_servernoise', 'implicit_autoview', + \ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', + \ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', + \ 'mail_check_recent', 'mail_check_stats', 'markers', 'mark_old', + \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', + \ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', + \ 'mime_type_query_first', 'narrow_tree', 'nm_record', 'nntp_listgroup', + \ 'nntp_load_description', 'pager_stop', 'pgp_autoinline', + \ 'pgp_auto_decode', 'pgp_check_exit', 'pgp_ignore_subkeys', 'pgp_long_ids', + \ 'pgp_replyinline', 'pgp_retainable_sigs', 'pgp_self_encrypt', + \ 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', + \ 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', + \ 'print_decode', 'print_split', 'prompt_after', 'read_only', + \ 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig', + \ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', + \ 'reverse_alias', 'reverse_name', 'reverse_realname', 'rfc2047_parameters', + \ 'save_address', 'save_empty', 'save_name', 'save_unsubscribed', 'score', + \ 'show_new_news', 'show_only_unread', 'sidebar_folder_indent', + \ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_on_right', + \ 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top', + \ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', + \ 'smime_is_default', 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', + \ 'ssl_usesystemcerts', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_tlsv1', + \ 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_verify_dates', + \ 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top', + \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', + \ 'thread_received', 'tilde', 'ts_enabled', 'uncollapse_jump', + \ 'uncollapse_new', 'user_agent', 'use_8bitmime', 'use_domain', + \ 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile', + \ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to' \ ], 0) +" CHECKED 2018-04-18 " Deprecated Bools -" UPDATE " List of DT_SYNONYM synonyms of Bools in MuttVars in init.h call s:boolQuadGen('Bool', [ - \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', - \ 'pgp_autoencrypt', 'pgp_autosign', 'pgp_auto_traditional', - \ 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign', - \ 'pgp_replysignencrypted', 'xterm_set_titles' + \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', + \ 'forw_quote', 'ignore_linear_white_space', 'pgp_autoencrypt', + \ 'pgp_autosign', 'pgp_auto_traditional', 'pgp_create_traditional', + \ 'pgp_replyencrypt', 'pgp_replysign', 'pgp_replysignencrypted', + \ 'xterm_set_titles' \ ], 1) +" CHECKED 2018-04-18 " List of DT_QUAD in MuttVars in init.h -" UPDATE call s:boolQuadGen('Quad', [ \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', \ 'catchup_newsgroup', 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', \ 'followup_to_poster', 'forward_edit', 'honor_followup_to', 'include', - \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_encrypt_self', - \ 'pgp_mime_auto', 'pop_delete', 'pop_reconnect', 'post_moderated', 'postpone', - \ 'print', 'quit', 'recall', 'reply_to', 'smime_encrypt_self', 'ssl_starttls', + \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_mime_auto', + \ 'pop_delete', 'pop_reconnect', 'postpone', 'post_moderated', 'print', + \ 'quit', 'recall', 'reply_to', 'ssl_starttls' \ ], 0) +" CHECKED 2018-04-18 " Deprecated Quads -" UPDATE " List of DT_SYNONYM synonyms of Quads in MuttVars in init.h call s:boolQuadGen('Quad', [ - \ 'mime_fwd', 'pgp_verify_sig' + \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self' \ ], 1) +" CHECKED 2018-04-18 " List of DT_NUMBER in MuttVars in init.h -" UPDATE syntax keyword muttrcVarNum skipwhite contained \ connect_timeout debug_level history imap_keepalive imap_pipeline_depth - \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc - \ nm_db_limit nm_open_timeout nm_query_window_current_position + \ imap_poll_timeout mail_check mail_check_stats_interval menu_context + \ net_inc nm_db_limit nm_open_timeout nm_query_window_current_position \ nm_query_window_duration nntp_context nntp_poll pager_context \ pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap - \ save_history score_threshold_delete score_threshold_flag score_threshold_read - \ search_context sendmail_wait sidebar_width skip_quoted_offset sleep_time - \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers - \ wrapmargin write_inc + \ save_history score_threshold_delete score_threshold_flag + \ score_threshold_read search_context sendmail_wait sidebar_component_depth + \ sidebar_width skip_quoted_offset sleep_time smime_timeout + \ ssl_min_dh_prime_bits timeout time_inc wrap wrap_headers write_inc + \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +syntax keyword muttrcVarDeprecatedNum contained skipwhite + \ wrapmargin \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of DT_STRING in MuttVars in init.h -" UPDATE " Special cases first, and all the rest at the end -" A lot of special cases are format, flatcap compiled a list here https://pastebin.com/raw/5QXhiP6L " Formats themselves must be updated in their respective groups " See s:escapesConditionals syntax match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr @@ -523,49 +524,52 @@ syntax keyword muttrcVarStr contained skipwhite attribution index_format message " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite hdr_format msg_format nextgroup=muttrcVarEqualsIdxFmt syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt -syntax keyword muttrcVarStr contained skipwhite - \ pgp_decode_command pgp_verify_command pgp_decrypt_command - \ pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command - \ pgp_encrypt_only_command pgp_import_command pgp_export_command - \ pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command +syntax keyword muttrcVarStr contained skipwhite + \ pgp_clearsign_command pgp_decode_command pgp_decrypt_command + \ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command + \ pgp_import_command pgp_list_pubring_command pgp_list_secring_command + \ pgp_sign_command pgp_verify_command pgp_verify_key_command \ nextgroup=muttrcVarEqualsPGPCmdFmt syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt syntax keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt syntax keyword muttrcVarStr contained skipwhite - \ smime_decrypt_command smime_verify_command smime_verify_opaque_command - \ smime_sign_command smime_sign_opaque_command smime_encrypt_command - \ smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command - \ smime_import_cert_command smime_get_cert_email_command + \ smime_decrypt_command smime_encrypt_command smime_get_cert_command + \ smime_get_cert_email_command smime_get_signer_cert_command + \ smime_import_cert_command smime_pk7out_command smime_sign_command + \ smime_verify_command smime_verify_opaque_command \ nextgroup=muttrcVarEqualsSmimeFmt syntax keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite xterm_icon xterm_title nextgroup=muttrcVarEqualsStatusFmt syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt -syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt +syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSdbFmt syntax keyword muttrcVarStr contained skipwhite \ assumed_charset attach_charset attach_sep attribution_locale charset - \ config_charset content_type default_hook dsn_notify dsn_return empty_subject - \ escape forward_attribution_intro forward_attribution_trailer forward_format - \ header_cache_pagesize hostname imap_authenticators imap_delim_chars - \ imap_headers imap_login imap_pass imap_user indent_string mailcap_path - \ mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen - \ mime_type_query_command newsgroups_charset news_server nm_default_uri - \ nm_exclude_tags nm_hidden_tags nm_query_type nm_query_window_current_search - \ nm_query_window_timebase nm_record_tags nm_unread_tag nntp_authenticators - \ nntp_pass nntp_user pgp_self_encrypt_as pgp_sign_as pipe_sep - \ pop_authenticators pop_host pop_pass pop_user post_indent_string - \ postpone_encrypt_as preconnect realname send_charset + \ config_charset content_type default_hook dsn_notify dsn_return + \ empty_subject escape forward_attribution_intro forward_attribution_trailer + \ forward_format header_cache_pagesize hidden_tags hostname + \ imap_authenticators imap_delim_chars imap_headers imap_login imap_pass + \ imap_user indent_string mailcap_path mark_macro_prefix mh_seq_flagged + \ mh_seq_replied mh_seq_unseen mime_type_query_command newsgroups_charset + \ news_server nm_default_uri nm_exclude_tags nm_query_type + \ nm_query_window_current_search nm_query_window_timebase nm_record_tags + \ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key + \ pgp_sign_as pipe_sep pop_authenticators pop_host pop_pass pop_user + \ postpone_encrypt_as post_indent_string preconnect realname send_charset \ show_multipart_alternative sidebar_delim_chars sidebar_divider_char \ sidebar_indent_string simple_search smime_default_key smime_encrypt_with - \ smime_self_encrypt_as smime_sign_digest_alg smtp_authenticators smtp_pass - \ smtp_url spam_separator ssl_ciphers tunnel xlabel_delimiter + \ smime_sign_as smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url + \ spam_separator ssl_ciphers tunnel \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " Deprecated strings syntax keyword muttrcVarDeprecatedStr contained skipwhite - \ forw_format indent_str post_indent_str smime_sign_as + \ forw_format indent_str pgp_self_encrypt_as post_indent_str + \ smime_self_encrypt_as \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_ADDRESS syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_HCACHE @@ -574,6 +578,8 @@ syntax keyword muttrcVarStr contained skipwhite header_cache_backend nextgroup=m syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_MBTABLE syntax keyword muttrcVarStr contained skipwhite flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_PATH syntax keyword muttrcVarStr contained skipwhite \ alias_file certificate_file debug_file display_filter editor entropy_file @@ -583,20 +589,24 @@ syntax keyword muttrcVarStr contained skipwhite \ smime_certificates smime_keys spoolfile ssl_ca_certificates_file \ ssl_client_cert tmpdir trash visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of deprecated DT_PATH -syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_REGEX syntax keyword muttrcVarStr contained skipwhite - \ attach_keyword gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regexp - \ reply_regexp smileys + \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign + \ quote_regex reply_regex smileys \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" List of deprecated DT_PATH +syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" List of deprecated DT_REGEX +syntax keyword muttrcVarDeprecatedStr contained skipwhite abort_noattach_regexp attach_keyword quote_regexp reply_regexp nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_SORT syntax keyword muttrcVarStr contained skipwhite \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of commands in Commands in init.h -" UPDATE " Remember to remove hooks, they have already been dealt with syntax keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks @@ -609,19 +619,16 @@ syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrc syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction syntax keyword muttrcCommand skipwhite - \ alternative_order attachments auto_view hdr_order ifdef ifndef ignore lua - \ lua-source mailboxes mailto_allow mime_lookup my_hdr push score setenv - \ sidebar_whitelist source subjectrx tag-formats tag-transforms - \ unalternative_order unattachments unauto_view uncolor unhdr_order unignore - \ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv - \ unsidebar_whitelist unsubjectrx unvirtual-mailboxes virtual-mailboxes - + \ alternative_order attachments auto_view finish hdr_order ifdef ifndef + \ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score + \ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats + \ tag-transforms unalternative_order unattachments unauto_view uncolor + \ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono + \ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from + \ unvirtual-mailboxes virtual-mailboxes + +" CHECKED 2018-04-18 " List of functions in functions.h -" UPDATE -syntax match muttrcFunction contained "\<accept\>" -syntax match muttrcFunction contained "\<append\>" -syntax match muttrcFunction contained "\<attach-file\>" -syntax match muttrcFunction contained "\<attach-key\>" syntax match muttrcFunction contained "\<accept\>" syntax match muttrcFunction contained "\<append\>" syntax match muttrcFunction contained "\<attach-file\>" @@ -632,8 +639,8 @@ syntax match muttrcFunction contained "\<backspace\>" syntax match muttrcFunction contained "\<backward-char\>" syntax match muttrcFunction contained "\<backward-word\>" syntax match muttrcFunction contained "\<bol\>" -syntax match muttrcFunction contained "\<bottom\>" syntax match muttrcFunction contained "\<bottom-page\>" +syntax match muttrcFunction contained "\<bottom\>" syntax match muttrcFunction contained "\<bounce-message\>" syntax match muttrcFunction contained "\<break-thread\>" syntax match muttrcFunction contained "\<buffy-cycle\>" @@ -643,10 +650,10 @@ syntax match muttrcFunction contained "\<catchup\>" syntax match muttrcFunction contained "\<chain-next\>" syntax match muttrcFunction contained "\<chain-prev\>" syntax match muttrcFunction contained "\<change-dir\>" -syntax match muttrcFunction contained "\<change-folder\>" syntax match muttrcFunction contained "\<change-folder-readonly\>" -syntax match muttrcFunction contained "\<change-newsgroup\>" +syntax match muttrcFunction contained "\<change-folder\>" syntax match muttrcFunction contained "\<change-newsgroup-readonly\>" +syntax match muttrcFunction contained "\<change-newsgroup\>" syntax match muttrcFunction contained "\<change-vfolder\>" syntax match muttrcFunction contained "\<check-new\>" syntax match muttrcFunction contained "\<check-traditional-pgp\>" @@ -654,8 +661,8 @@ syntax match muttrcFunction contained "\<clear-flag\>" syntax match muttrcFunction contained "\<collapse-all\>" syntax match muttrcFunction contained "\<collapse-parts\>" syntax match muttrcFunction contained "\<collapse-thread\>" -syntax match muttrcFunction contained "\<complete\>" syntax match muttrcFunction contained "\<complete-query\>" +syntax match muttrcFunction contained "\<complete\>" syntax match muttrcFunction contained "\<compose-to-sender\>" syntax match muttrcFunction contained "\<copy-file\>" syntax match muttrcFunction contained "\<copy-message\>" @@ -668,7 +675,6 @@ syntax match muttrcFunction contained "\<decode-copy\>" syntax match muttrcFunction contained "\<decode-save\>" syntax match muttrcFunction contained "\<decrypt-copy\>" syntax match muttrcFunction contained "\<decrypt-save\>" -syntax match muttrcFunction contained "\<delete\>" syntax match muttrcFunction contained "\<delete-char\>" syntax match muttrcFunction contained "\<delete-entry\>" syntax match muttrcFunction contained "\<delete-mailbox\>" @@ -676,13 +682,13 @@ syntax match muttrcFunction contained "\<delete-message\>" syntax match muttrcFunction contained "\<delete-pattern\>" syntax match muttrcFunction contained "\<delete-subthread\>" syntax match muttrcFunction contained "\<delete-thread\>" +syntax match muttrcFunction contained "\<delete\>" syntax match muttrcFunction contained "\<detach-file\>" syntax match muttrcFunction contained "\<display-address\>" syntax match muttrcFunction contained "\<display-filename\>" syntax match muttrcFunction contained "\<display-message\>" syntax match muttrcFunction contained "\<display-toggle-weed\>" syntax match muttrcFunction contained "\<downcase-word\>" -syntax match muttrcFunction contained "\<edit\>" syntax match muttrcFunction contained "\<edit-bcc\>" syntax match muttrcFunction contained "\<edit-cc\>" syntax match muttrcFunction contained "\<edit-description\>" @@ -696,11 +702,14 @@ syntax match muttrcFunction contained "\<edit-label\>" syntax match muttrcFunction contained "\<edit-message\>" syntax match muttrcFunction contained "\<edit-mime\>" syntax match muttrcFunction contained "\<edit-newsgroups\>" +syntax match muttrcFunction contained "\<edit-or-view-raw-message\>" +syntax match muttrcFunction contained "\<edit-raw-message\>" syntax match muttrcFunction contained "\<edit-reply-to\>" syntax match muttrcFunction contained "\<edit-subject\>" syntax match muttrcFunction contained "\<edit-to\>" syntax match muttrcFunction contained "\<edit-type\>" syntax match muttrcFunction contained "\<edit-x-comment-to\>" +syntax match muttrcFunction contained "\<edit\>" syntax match muttrcFunction contained "\<end-cond\>" syntax match muttrcFunction contained "\<enter-command\>" syntax match muttrcFunction contained "\<enter-mask\>" @@ -723,11 +732,13 @@ syntax match muttrcFunction contained "\<get-children\>" syntax match muttrcFunction contained "\<get-message\>" syntax match muttrcFunction contained "\<get-parent\>" syntax match muttrcFunction contained "\<goto-folder\>" +syntax match muttrcFunction contained "\<goto-parent\>" syntax match muttrcFunction contained "\<group-reply\>" syntax match muttrcFunction contained "\<half-down\>" syntax match muttrcFunction contained "\<half-up\>" syntax match muttrcFunction contained "\<help\>" syntax match muttrcFunction contained "\<history-down\>" +syntax match muttrcFunction contained "\<history-search\>" syntax match muttrcFunction contained "\<history-up\>" syntax match muttrcFunction contained "\<imap-fetch-mail\>" syntax match muttrcFunction contained "\<imap-logout-all\>" @@ -739,29 +750,32 @@ syntax match muttrcFunction contained "\<kill-eow\>" syntax match muttrcFunction contained "\<kill-line\>" syntax match muttrcFunction contained "\<kill-word\>" syntax match muttrcFunction contained "\<last-entry\>" -syntax match muttrcFunction contained "\<limit\>" syntax match muttrcFunction contained "\<limit-current-thread\>" +syntax match muttrcFunction contained "\<limit\>" syntax match muttrcFunction contained "\<link-threads\>" syntax match muttrcFunction contained "\<list-reply\>" -syntax match muttrcFunction contained "\<mail\>" syntax match muttrcFunction contained "\<mail-key\>" +syntax match muttrcFunction contained "\<mail\>" syntax match muttrcFunction contained "\<mark-as-new\>" syntax match muttrcFunction contained "\<mark-message\>" syntax match muttrcFunction contained "\<middle-page\>" syntax match muttrcFunction contained "\<mix\>" -syntax match muttrcFunction contained "\<modify-labels\>" syntax match muttrcFunction contained "\<modify-labels-then-hide\>" +syntax match muttrcFunction contained "\<modify-labels\>" +syntax match muttrcFunction contained "\<modify-tags-then-hide\>" +syntax match muttrcFunction contained "\<modify-tags\>" syntax match muttrcFunction contained "\<new-mime\>" syntax match muttrcFunction contained "\<next-entry\>" syntax match muttrcFunction contained "\<next-line\>" -syntax match muttrcFunction contained "\<next-new\>" syntax match muttrcFunction contained "\<next-new-then-unread\>" +syntax match muttrcFunction contained "\<next-new\>" syntax match muttrcFunction contained "\<next-page\>" syntax match muttrcFunction contained "\<next-subthread\>" syntax match muttrcFunction contained "\<next-thread\>" syntax match muttrcFunction contained "\<next-undeleted\>" -syntax match muttrcFunction contained "\<next-unread\>" syntax match muttrcFunction contained "\<next-unread-mailbox\>" +syntax match muttrcFunction contained "\<next-unread\>" +syntax match muttrcFunction contained "\<noop\>" syntax match muttrcFunction contained "\<parent-message\>" syntax match muttrcFunction contained "\<pgp-menu\>" syntax match muttrcFunction contained "\<pipe-entry\>" @@ -770,8 +784,8 @@ syntax match muttrcFunction contained "\<post-message\>" syntax match muttrcFunction contained "\<postpone-message\>" syntax match muttrcFunction contained "\<previous-entry\>" syntax match muttrcFunction contained "\<previous-line\>" -syntax match muttrcFunction contained "\<previous-new\>" syntax match muttrcFunction contained "\<previous-new-then-unread\>" +syntax match muttrcFunction contained "\<previous-new\>" syntax match muttrcFunction contained "\<previous-page\>" syntax match muttrcFunction contained "\<previous-subthread\>" syntax match muttrcFunction contained "\<previous-thread\>" @@ -782,8 +796,8 @@ syntax match muttrcFunction contained "\<print-message\>" syntax match muttrcFunction contained "\<purge-message\>" syntax match muttrcFunction contained "\<purge-thread\>" syntax match muttrcFunction contained "\<quasi-delete\>" -syntax match muttrcFunction contained "\<query\>" syntax match muttrcFunction contained "\<query-append\>" +syntax match muttrcFunction contained "\<query\>" syntax match muttrcFunction contained "\<quit\>" syntax match muttrcFunction contained "\<quote-char\>" syntax match muttrcFunction contained "\<read-subthread\>" @@ -801,40 +815,41 @@ syntax match muttrcFunction contained "\<resend-message\>" syntax match muttrcFunction contained "\<root-message\>" syntax match muttrcFunction contained "\<save-entry\>" syntax match muttrcFunction contained "\<save-message\>" -syntax match muttrcFunction contained "\<search\>" syntax match muttrcFunction contained "\<search-next\>" syntax match muttrcFunction contained "\<search-opposite\>" syntax match muttrcFunction contained "\<search-reverse\>" syntax match muttrcFunction contained "\<search-toggle\>" +syntax match muttrcFunction contained "\<search\>" syntax match muttrcFunction contained "\<select-entry\>" syntax match muttrcFunction contained "\<select-new\>" syntax match muttrcFunction contained "\<send-message\>" syntax match muttrcFunction contained "\<set-flag\>" syntax match muttrcFunction contained "\<shell-escape\>" syntax match muttrcFunction contained "\<show-limit\>" +syntax match muttrcFunction contained "\<show-log-messages\>" syntax match muttrcFunction contained "\<show-version\>" -syntax match muttrcFunction contained "\<sidebar-next\>" syntax match muttrcFunction contained "\<sidebar-next-new\>" +syntax match muttrcFunction contained "\<sidebar-next\>" syntax match muttrcFunction contained "\<sidebar-open\>" syntax match muttrcFunction contained "\<sidebar-page-down\>" syntax match muttrcFunction contained "\<sidebar-page-up\>" -syntax match muttrcFunction contained "\<sidebar-prev\>" syntax match muttrcFunction contained "\<sidebar-prev-new\>" +syntax match muttrcFunction contained "\<sidebar-prev\>" syntax match muttrcFunction contained "\<sidebar-toggle-virtual\>" syntax match muttrcFunction contained "\<sidebar-toggle-visible\>" syntax match muttrcFunction contained "\<skip-quoted\>" syntax match muttrcFunction contained "\<smime-menu\>" -syntax match muttrcFunction contained "\<sort\>" syntax match muttrcFunction contained "\<sort-mailbox\>" syntax match muttrcFunction contained "\<sort-reverse\>" -syntax match muttrcFunction contained "\<subscribe\>" +syntax match muttrcFunction contained "\<sort\>" syntax match muttrcFunction contained "\<subscribe-pattern\>" +syntax match muttrcFunction contained "\<subscribe\>" syntax match muttrcFunction contained "\<sync-mailbox\>" syntax match muttrcFunction contained "\<tag-entry\>" syntax match muttrcFunction contained "\<tag-message\>" syntax match muttrcFunction contained "\<tag-pattern\>" -syntax match muttrcFunction contained "\<tag-prefix\>" syntax match muttrcFunction contained "\<tag-prefix-cond\>" +syntax match muttrcFunction contained "\<tag-prefix\>" syntax match muttrcFunction contained "\<tag-subthread\>" syntax match muttrcFunction contained "\<tag-thread\>" syntax match muttrcFunction contained "\<toggle-disposition\>" @@ -846,8 +861,8 @@ syntax match muttrcFunction contained "\<toggle-recode\>" syntax match muttrcFunction contained "\<toggle-subscribed\>" syntax match muttrcFunction contained "\<toggle-unlink\>" syntax match muttrcFunction contained "\<toggle-write\>" -syntax match muttrcFunction contained "\<top\>" syntax match muttrcFunction contained "\<top-page\>" +syntax match muttrcFunction contained "\<top\>" syntax match muttrcFunction contained "\<transpose-chars\>" syntax match muttrcFunction contained "\<uncatchup\>" syntax match muttrcFunction contained "\<undelete-entry\>" @@ -855,8 +870,8 @@ syntax match muttrcFunction contained "\<undelete-message\>" syntax match muttrcFunction contained "\<undelete-pattern\>" syntax match muttrcFunction contained "\<undelete-subthread\>" syntax match muttrcFunction contained "\<undelete-thread\>" -syntax match muttrcFunction contained "\<unsubscribe\>" syntax match muttrcFunction contained "\<unsubscribe-pattern\>" +syntax match muttrcFunction contained "\<unsubscribe\>" syntax match muttrcFunction contained "\<untag-pattern\>" syntax match muttrcFunction contained "\<upcase-word\>" syntax match muttrcFunction contained "\<update-encoding\>" @@ -864,11 +879,12 @@ syntax match muttrcFunction contained "\<verify-key\>" syntax match muttrcFunction contained "\<vfolder-from-query\>" syntax match muttrcFunction contained "\<vfolder-window-backward\>" syntax match muttrcFunction contained "\<vfolder-window-forward\>" -syntax match muttrcFunction contained "\<view-attach\>" syntax match muttrcFunction contained "\<view-attachments\>" +syntax match muttrcFunction contained "\<view-attach\>" syntax match muttrcFunction contained "\<view-file\>" syntax match muttrcFunction contained "\<view-mailcap\>" syntax match muttrcFunction contained "\<view-name\>" +syntax match muttrcFunction contained "\<view-raw-message\>" syntax match muttrcFunction contained "\<view-text\>" syntax match muttrcFunction contained "\<what-key\>" syntax match muttrcFunction contained "\<write-fcc\>" @@ -1029,4 +1045,5 @@ let b:current_syntax = "neomuttrc" let &cpo = s:cpo_save unlet s:cpo_save -"EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim + +" vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=- diff --git a/runtime/syntax/ninja.vim b/runtime/syntax/ninja.vim index f34588f60c..a53567e585 100644 --- a/runtime/syntax/ninja.vim +++ b/runtime/syntax/ninja.vim @@ -1,16 +1,16 @@ " ninja build file syntax. " Language: ninja build file as described at -" http://martine.github.com/ninja/manual.html -" Version: 1.4 -" Last Change: 2014/05/13 +" http://ninja-build.org/manual.html +" Version: 1.5 +" Last Change: 2018/04/05 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> -" Version 1.4 of this script is in the upstream vim repository and will be +" Version 1.5 of this script is in the upstream vim repository and will be " included in the next vim release. If you change this, please send your change " upstream. " ninja lexer and parser are at -" https://github.com/martine/ninja/blob/master/src/lexer.in.cc -" https://github.com/martine/ninja/blob/master/src/manifest_parser.cc +" https://github.com/ninja-build/ninja/blob/master/src/lexer.in.cc +" https://github.com/ninja-build/ninja/blob/master/src/manifest_parser.cc if exists("b:current_syntax") finish @@ -21,7 +21,10 @@ set cpo&vim syn case match -syn match ninjaComment /#.*/ contains=@Spell +" Comments are only matched when the # is at the beginning of the line (with +" optional whitespace), as long as the prior line didn't end with a $ +" continuation. +syn match ninjaComment /\(\$\n\)\@<!\_^\s*#.*$/ contains=@Spell " Toplevel statements are the ones listed here and " toplevel variable assignments (ident '=' value). @@ -38,12 +41,13 @@ syn match ninjaKeyword "^subninja\>" " limited set of magic variables, 'build' allows general " let assignments. " manifest_parser.cc, ParseRule() -syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent -syn keyword ninjaRuleCommand contained command deps depfile description generator +syn region ninjaRule start="^rule" end="^\ze\S" contains=TOP transparent +syn keyword ninjaRuleCommand contained containedin=ninjaRule command + \ deps depfile description generator \ pool restat rspfile rspfile_content -syn region ninjaPool start="^pool" end="^\ze\S" contains=ALL transparent -syn keyword ninjaPoolCommand contained depth +syn region ninjaPool start="^pool" end="^\ze\S" contains=TOP transparent +syn keyword ninjaPoolCommand contained containedin=ninjaPool depth " Strings are parsed as follows: " lexer.in.cc, ReadEvalString() diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim index 3a343dd430..f6d5cab6a8 100644 --- a/runtime/syntax/nsis.vim +++ b/runtime/syntax/nsis.vim @@ -1,52 +1,72 @@ " Vim syntax file -" Language: NSIS script, for version of NSIS 1.91 and later -" Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> -" Last Change: 2004 May 12 +" Language: NSIS script, for version of NSIS 3.03 and later +" Maintainer: Ken Takata +" URL: https://github.com/k-takata/vim-nsis +" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> +" Last Change: 2018-02-07 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore -"COMMENTS +"Pseudo definitions +syn match nsisLine nextgroup=@nsisPseudoStatement skipwhite "^" +syn cluster nsisPseudoStatement contains=nsisFirstComment,nsisLocalLabel,nsisGlobalLabel +syn cluster nsisPseudoStatement add=nsisDefine,nsisPreCondit,nsisMacro,nsisInclude,nsisSystem +syn cluster nsisPseudoStatement add=nsisAttribute,nsisCompiler,nsisVersionInfo,nsisInstruction,nsisStatement + +"COMMENTS (4.1) syn keyword nsisTodo todo attention note fixme readme -syn region nsisComment start=";" end="$" contains=nsisTodo -syn region nsisComment start="#" end="$" contains=nsisTodo - -"LABELS -syn match nsisLocalLabel "\a\S\{-}:" -syn match nsisGlobalLabel "\.\S\{-1,}:" - -"PREPROCESSOR -syn match nsisPreprocSubst "${.\{-}}" -syn match nsisDefine "!define\>" -syn match nsisDefine "!undef\>" -syn match nsisPreCondit "!ifdef\>" -syn match nsisPreCondit "!ifndef\>" -syn match nsisPreCondit "!endif\>" -syn match nsisPreCondit "!else\>" -syn match nsisMacro "!macro\>" -syn match nsisMacro "!macroend\>" -syn match nsisMacro "!insertmacro\>" - -"COMPILER UTILITY -syn match nsisInclude "!include\>" -syn match nsisSystem "!cd\>" -syn match nsisSystem "!system\>" -syn match nsisSystem "!packhdr\>" - -"VARIABLES +syn region nsisComment start="[;#]" end="$" contains=nsisTodo,nsisLineContinuation,@Spell oneline +syn region nsisComment start=".\@1<=/\*" end="\*/" contains=nsisTodo,@Spell +syn region nsisFirstComment start="/\*" end="\*/" contained contains=nsisTodo,@Spell skipwhite + \ nextgroup=@nsisPseudoStatement + +syn match nsisLineContinuation "\\$" + +"STRINGS (4.1) +syn region nsisString start=/"/ end=/"/ contains=@nsisStringItems,@Spell +syn region nsisString start=/'/ end=/'/ contains=@nsisStringItems,@Spell +syn region nsisString start=/`/ end=/`/ contains=@nsisStringItems,@Spell + +syn cluster nsisStringItems contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisRegistry,nsisLineContinuation + +"NUMBERS (4.1) +syn match nsisNumber "\<[1-9]\d*\>" +syn match nsisNumber "\<0x\x\+\>" +syn match nsisNumber "\<0\o*\>" + +"STRING REPLACEMENT (5.4, 4.9.15.2, 5.3.1) +syn region nsisPreprocSubst start="\${" end="}" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar +syn region nsisPreprocLangStr start="\$(" end=")" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar +syn region nsisPreprocEnvVar start="\$%" end="%" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar + +"VARIABLES (4.2.2) syn match nsisUserVar "$\d" syn match nsisUserVar "$R\d" syn match nsisSysVar "$INSTDIR" syn match nsisSysVar "$OUTDIR" syn match nsisSysVar "$CMDLINE" +syn match nsisSysVar "$LANGUAGE" +"CONSTANTS (4.2.3) syn match nsisSysVar "$PROGRAMFILES" +syn match nsisSysVar "$PROGRAMFILES32" +syn match nsisSysVar "$PROGRAMFILES64" +syn match nsisSysVar "$COMMONFILES" +syn match nsisSysVar "$COMMONFILES32" +syn match nsisSysVar "$COMMONFILES64" syn match nsisSysVar "$DESKTOP" syn match nsisSysVar "$EXEDIR" +syn match nsisSysVar "$EXEFILE" +syn match nsisSysVar "$EXEPATH" +syn match nsisSysVar "${NSISDIR}" syn match nsisSysVar "$WINDIR" syn match nsisSysVar "$SYSDIR" syn match nsisSysVar "$TEMP" @@ -54,170 +74,515 @@ syn match nsisSysVar "$STARTMENU" syn match nsisSysVar "$SMPROGRAMS" syn match nsisSysVar "$SMSTARTUP" syn match nsisSysVar "$QUICKLAUNCH" +syn match nsisSysVar "$DOCUMENTS" +syn match nsisSysVar "$SENDTO" +syn match nsisSysVar "$RECENT" +syn match nsisSysVar "$FAVORITES" +syn match nsisSysVar "$MUSIC" +syn match nsisSysVar "$PICTURES" +syn match nsisSysVar "$VIDEOS" +syn match nsisSysVar "$NETHOOD" +syn match nsisSysVar "$FONTS" +syn match nsisSysVar "$TEMPLATES" +syn match nsisSysVar "$APPDATA" +syn match nsisSysVar "$LOCALAPPDATA" +syn match nsisSysVar "$PRINTHOOD" +syn match nsisSysVar "$INTERNET_CACHE" +syn match nsisSysVar "$COOKIES" +syn match nsisSysVar "$HISTORY" +syn match nsisSysVar "$PROFILE" +syn match nsisSysVar "$ADMINTOOLS" +syn match nsisSysVar "$RESOURCES" +syn match nsisSysVar "$RESOURCES_LOCALIZED" +syn match nsisSysVar "$CDBURN_AREA" syn match nsisSysVar "$HWNDPARENT" +syn match nsisSysVar "$PLUGINSDIR" syn match nsisSysVar "$\\r" syn match nsisSysVar "$\\n" +syn match nsisSysVar "$\\t" syn match nsisSysVar "$\$" +syn match nsisSysVar "$\\["'`]" -"STRINGS -syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry -syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry -syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +"LABELS (4.3) +syn match nsisLocalLabel contained "[^-+!$0-9;#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)" +syn match nsisGlobalLabel contained "\.[^-+!$0-9;# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)" "CONSTANTS -syn keyword nsisBoolean true false on off - -syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog -syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all -syn keyword nsisAttribOptions zlib bzip2 lzma - -syn match nsisAttribOptions '\/NOCUSTOM' -syn match nsisAttribOptions '\/CUSTOMSTRING' -syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM' -syn match nsisAttribOptions '\/windows' -syn match nsisAttribOptions '\/r' -syn match nsisAttribOptions '\/oname' -syn match nsisAttribOptions '\/REBOOTOK' -syn match nsisAttribOptions '\/SILENT' -syn match nsisAttribOptions '\/FILESONLY' -syn match nsisAttribOptions '\/SHORT' - -syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED - -syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD -syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS -syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA - -syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY -syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN -syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM -syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY - -syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL -syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP -syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT -syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 -syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES - -syn match nsisNumber "\<[^0]\d*\>" -syn match nsisNumber "\<0x\x\+\>" -syn match nsisNumber "\<0\o*\>" +syn keyword nsisBoolean contained true false +syn keyword nsisOnOff contained on off + +syn keyword nsisRegistry contained HKCR HKLM HKCU HKU HKCC HKDD HKPD SHCTX +syn keyword nsisRegistry contained HKCR32 HKCR64 HKCU32 HKCU64 HKLM32 HKLM64 +syn keyword nsisRegistry contained HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS +syn keyword nsisRegistry contained HKEY_CLASSES_ROOT32 HKEY_CLASSES_ROOT64 +syn keyword nsisRegistry contained HKEY_CURRENT_USER32 HKEY_CURRENT_USER64 +syn keyword nsisRegistry contained HKEY_LOCAL_MACHINE32 HKEY_LOCAL_MACHINE64 +syn keyword nsisRegistry contained HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA +syn keyword nsisRegistry contained SHELL_CONTEXT + + +" common options +syn cluster nsisAnyOpt contains=nsisComment,nsisLineContinuation,nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisString,nsisNumber +syn region nsisBooleanOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBoolean +syn region nsisOnOffOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisOnOff +syn region nsisLangOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLangKwd +syn match nsisLangKwd contained "/LANG\>" +syn region nsisFontOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFontKwd +syn match nsisFontKwd contained "/\%(ITALIC\|UNDERLINE\|STRIKE\)\>" + +"STATEMENTS - pages (4.5) +syn keyword nsisStatement contained Page UninstPage nextgroup=nsisPageOpt skipwhite +syn region nsisPageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageKwd +syn keyword nsisPageKwd contained custom license components directory instfiles uninstConfirm +syn match nsisPageKwd contained "/ENABLECANCEL\>" + +syn keyword nsisStatement contained PageEx nextgroup=nsisPageExOpt skipwhite +syn region nsisPageExOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageExKwd +syn match nsisPageExKwd contained "\<\%(un\.\)\?\%(custom\|license\|components\|directory\|instfiles\|uninstConfirm\)\>" + +syn keyword nsisStatement contained PageExEnd PageCallbacks + +"STATEMENTS - sections (4.6.1) +syn keyword nsisStatement contained AddSize SectionEnd SectionGroupEnd + +syn keyword nsisStatement contained Section nextgroup=nsisSectionOpt skipwhite +syn region nsisSectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionKwd +syn match nsisSectionKwd contained "/o\>" + +syn keyword nsisStatement contained SectionIn nextgroup=nsisSectionInOpt skipwhite +syn region nsisSectionInOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionInKwd +syn keyword nsisSectionInKwd contained RO + +syn keyword nsisStatement contained SectionGroup nextgroup=nsisSectionGroupOpt skipwhite +syn region nsisSectionGroupOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionGroupKwd +syn match nsisSectionGroupKwd contained "/e\>" + +"STATEMENTS - functions (4.7.1) +syn keyword nsisStatement contained Function FunctionEnd + + +"STATEMENTS - LogicLib.nsh +syn match nsisStatement "${If}" +syn match nsisStatement "${IfNot}" +syn match nsisStatement "${Unless}" +syn match nsisStatement "${ElseIf}" +syn match nsisStatement "${ElseIfNot}" +syn match nsisStatement "${ElseUnless}" +syn match nsisStatement "${Else}" +syn match nsisStatement "${EndIf}" +syn match nsisStatement "${EndUnless}" +syn match nsisStatement "${AndIf}" +syn match nsisStatement "${AndIfNot}" +syn match nsisStatement "${AndUnless}" +syn match nsisStatement "${OrIf}" +syn match nsisStatement "${OrIfNot}" +syn match nsisStatement "${OrUnless}" +syn match nsisStatement "${IfThen}" +syn match nsisStatement "${IfNotThen}" +syn match nsisStatement "${||\?}" nextgroup=@nsisPseudoStatement skipwhite +syn match nsisStatement "${IfCmd}" nextgroup=@nsisPseudoStatement skipwhite +syn match nsisStatement "${Select}" +syn match nsisStatement "${Case}" +syn match nsisStatement "${Case[2-5]}" +syn match nsisStatement "${CaseElse}" +syn match nsisStatement "${Default}" +syn match nsisStatement "${EndSelect}" +syn match nsisStatement "${Switch}" +syn match nsisStatement "${EndSwitch}" +syn match nsisStatement "${Break}" +syn match nsisStatement "${Do}" +syn match nsisStatement "${DoWhile}" +syn match nsisStatement "${DoUntil}" +syn match nsisStatement "${ExitDo}" +syn match nsisStatement "${Continue}" +syn match nsisStatement "${Loop}" +syn match nsisStatement "${LoopWhile}" +syn match nsisStatement "${LoopUntil}" +syn match nsisStatement "${For}" +syn match nsisStatement "${ForEach}" +syn match nsisStatement "${ExitFor}" +syn match nsisStatement "${Next}" +"STATEMENTS - Memento.nsh +syn match nsisStatement "${MementoSection}" +syn match nsisStatement "${MementoSectionEnd}" + + +"USER VARIABLES (4.2.1) +syn keyword nsisInstruction contained Var nextgroup=nsisVarOpt skipwhite +syn region nsisVarOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVarKwd +syn match nsisVarKwd contained "/GLOBAL\>" + +"INSTALLER ATTRIBUTES (4.8.1) +syn keyword nsisAttribute contained Caption ChangeUI CheckBitmap CompletedText ComponentText +syn keyword nsisAttribute contained DetailsButtonText DirText DirVar +syn keyword nsisAttribute contained FileErrorText Icon InstallButtonText +syn keyword nsisAttribute contained InstallDir InstProgressFlags +syn keyword nsisAttribute contained LicenseData LicenseText +syn keyword nsisAttribute contained MiscButtonText Name OutFile +syn keyword nsisAttribute contained SpaceTexts SubCaption UninstallButtonText UninstallCaption +syn keyword nsisAttribute contained UninstallIcon UninstallSubCaption UninstallText + +syn keyword nsisAttribute contained AddBrandingImage nextgroup=nsisAddBrandingImageOpt skipwhite +syn region nsisAddBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddBrandingImageKwd +syn keyword nsisAddBrandingImageKwd contained left right top bottom width height + +syn keyword nsisAttribute contained nextgroup=nsisBooleanOpt skipwhite + \ AllowRootDirInstall AutoCloseWindow + +syn keyword nsisAttribute contained BGFont nextgroup=nsisFontOpt skipwhite + +syn keyword nsisAttribute contained BGGradient nextgroup=nsisBGGradientOpt skipwhite +syn region nsisBGGradientOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBGGradientKwd +syn keyword nsisBGGradientKwd contained off + +syn keyword nsisAttribute contained BrandingText nextgroup=nsisBrandingTextOpt skipwhite +syn region nsisBrandingTextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBrandingTextKwd +syn match nsisBrandingTextKwd contained "/TRIM\%(LEFT\|RIGHT\|CENTER\)\>" + +syn keyword nsisAttribute contained CRCCheck nextgroup=nsisCRCCheckOpt skipwhite +syn region nsisCRCCheckOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCRCCheckKwd +syn keyword nsisCRCCheckKwd contained on off force + +syn keyword nsisAttribute contained DirVerify nextgroup=nsisDirVerifyOpt skipwhite +syn region nsisDirVerifyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDirVerifyKwd +syn keyword nsisDirVerifyKwd contained auto leave + +syn keyword nsisAttribute contained InstallColors nextgroup=nsisInstallColorsOpt skipwhite +syn region nsisInstallColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstallColorsKwd +syn match nsisInstallColorsKwd contained "/windows\>" + +syn keyword nsisAttribute contained InstallDirRegKey nextgroup=nsisRegistryOpt skipwhite + +syn keyword nsisAttribute contained InstType nextgroup=nsisInstTypeOpt skipwhite +syn region nsisInstTypeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstTypeKwd +syn match nsisInstTypeKwd contained "/\%(NOCUSTOM\|CUSTOMSTRING\|COMPONENTSONLYONCUSTOM\)\>" + +syn keyword nsisAttribute contained LicenseBkColor nextgroup=nsisLicenseBkColorOpt skipwhite +syn region nsisLicenseBkColorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseBkColorKwd +syn match nsisLicenseBkColorKwd contained "/\%(gray\|windows\)\>" + +syn keyword nsisAttribute contained LicenseForceSelection nextgroup=nsisLicenseForceSelectionOpt skipwhite +syn region nsisLicenseForceSelectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseForceSelectionKwd +syn keyword nsisLicenseForceSelectionKwd contained checkbox radiobuttons off + +syn keyword nsisAttribute contained ManifestDPIAware nextgroup=nsisManifestDPIAwareOpt skipwhite +syn region nsisManifestDPIAwareOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestDPIAwareKwd +syn keyword nsisManifestDPIAwareKwd contained notset true false + +syn keyword nsisAttribute contained ManifestSupportedOS nextgroup=nsisManifestSupportedOSOpt skipwhite +syn region nsisManifestSupportedOSOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestSupportedOSKwd +syn match nsisManifestSupportedOSKwd contained "\<\%(none\|all\|WinVista\|Win7\|Win8\|Win8\.1\|Win10\)\>" + +syn keyword nsisAttribute contained RequestExecutionLevel nextgroup=nsisRequestExecutionLevelOpt skipwhite +syn region nsisRequestExecutionLevelOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRequestExecutionLevelKwd +syn keyword nsisRequestExecutionLevelKwd contained none user highest admin + +syn keyword nsisAttribute contained SetFont nextgroup=nsisLangOpt skipwhite + +syn keyword nsisAttribute contained nextgroup=nsisShowInstDetailsOpt skipwhite + \ ShowInstDetails ShowUninstDetails +syn region nsisShowInstDetailsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisShowInstDetailsKwd +syn keyword nsisShowInstDetailsKwd contained hide show nevershow + +syn keyword nsisAttribute contained SilentInstall nextgroup=nsisSilentInstallOpt skipwhite +syn region nsisSilentInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentInstallKwd +syn keyword nsisSilentInstallKwd contained normal silent silentlog + +syn keyword nsisAttribute contained SilentUnInstall nextgroup=nsisSilentUnInstallOpt skipwhite +syn region nsisSilentUnInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentUnInstallKwd +syn keyword nsisSilentUnInstallKwd contained normal silent + +syn keyword nsisAttribute contained nextgroup=nsisOnOffOpt skipwhite + \ WindowIcon XPStyle + +"COMPILER FLAGS (4.8.2) +syn keyword nsisCompiler contained nextgroup=nsisOnOffOpt skipwhite + \ AllowSkipFiles SetDatablockOptimize SetDateSave + +syn keyword nsisCompiler contained FileBufSize SetCompressorDictSize + +syn keyword nsisCompiler contained SetCompress nextgroup=nsisSetCompressOpt skipwhite +syn region nsisSetCompressOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressKwd +syn keyword nsisSetCompressKwd contained auto force off + +syn keyword nsisCompiler contained SetCompressor nextgroup=nsisSetCompressorOpt skipwhite +syn region nsisSetCompressorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressorKwd +syn keyword nsisSetCompressorKwd contained zlib bzip2 lzma +syn match nsisSetCompressorKwd contained "/\%(SOLID\|FINAL\)" + +syn keyword nsisCompiler contained SetOverwrite nextgroup=nsisSetOverwriteOpt skipwhite +syn region nsisSetOverwriteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetOverwriteKwd +syn keyword nsisSetOverwriteKwd contained on off try ifnewer ifdiff lastused + +syn keyword nsisCompiler contained Unicode nextgroup=nsisBooleanOpt skipwhite + +"VERSION INFORMATION (4.8.3) +syn keyword nsisVersionInfo contained VIAddVersionKey nextgroup=nsisLangOpt skipwhite + +syn keyword nsisVersionInfo contained VIProductVersion VIFileVersion + + +"FUNCTIONS - basic (4.9.1) +syn keyword nsisInstruction contained Delete Rename nextgroup=nsisDeleteOpt skipwhite +syn region nsisDeleteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteKwd +syn match nsisDeleteKwd contained "/REBOOTOK\>" + +syn keyword nsisInstruction contained Exec ExecWait SetOutPath + +syn keyword nsisInstruction contained ExecShell ExecShellWait nextgroup=nsisExecShellOpt skipwhite +syn region nsisExecShellOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisExecShellKwd +syn keyword nsisExecShellKwd contained SW_SHOWDEFAULT SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_HIDE +syn match nsisExecShellKwd contained "/INVOKEIDLIST\>" + +syn keyword nsisInstruction contained File nextgroup=nsisFileOpt skipwhite +syn region nsisFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileKwd +syn match nsisFileKwd contained "/\%(nonfatal\|[arx]\|oname\)\>" + +syn keyword nsisInstruction contained ReserveFile nextgroup=nsisReserveFileOpt skipwhite +syn region nsisReserveFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisReserveFileKwd +syn match nsisReserveFileKwd contained "/\%(nonfatal\|[rx]\|plugin\)\>" +syn keyword nsisInstruction contained RMDir nextgroup=nsisRMDirOpt skipwhite +syn region nsisRMDirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRMDirKwd +syn match nsisRMDirKwd contained "/\%(REBOOTOK\|r\)\>" -"INSTALLER ATTRIBUTES - General installer configuration -syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon -syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall -syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText -"INSTALLER ATTRIBUTES - Install directory configuration -syn keyword nsisAttribute InstallDir InstallDirRegKey +"FUNCTIONS - registry & ini (4.9.2) +syn keyword nsisInstruction contained DeleteINISec DeleteINIStr FlushINI ReadINIStr WriteINIStr +syn keyword nsisInstruction contained ExpandEnvStrings ReadEnvStr -"INSTALLER ATTRIBUTES - License page configuration -syn keyword nsisAttribute LicenseText LicenseData +syn keyword nsisInstruction contained DeleteRegKey nextgroup=nsisDeleteRegKeyOpt skipwhite +syn region nsisDeleteRegKeyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteRegKeyKwd,nsisRegistry +syn match nsisDeleteRegKeyKwd contained "/ifempty\>" -"INSTALLER ATTRIBUTES - Component page configuration -syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts +syn keyword nsisInstruction contained nextgroup=nsisRegistryOpt skipwhite + \ DeleteRegValue EnumRegKey EnumRegValue ReadRegDWORD ReadRegStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr +syn region nsisRegistryOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry -"INSTALLER ATTRIBUTES - Directory page configuration -syn keyword nsisAttribute DirShow DirText AllowRootDirInstall +syn keyword nsisInstruction contained WriteRegMultiStr nextgroup=nsisWriteRegMultiStrOpt skipwhite +syn region nsisWriteRegMultiStrOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry,nsisWriteRegMultiStrKwd +syn match nsisWriteRegMultiStrKwd contained "/REGEDIT5\>" -"INSTALLER ATTRIBUTES - Install page configuration -syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow -syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText +syn keyword nsisInstruction contained SetRegView nextgroup=nsisSetRegViewOpt skipwhite +syn region nsisSetRegViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetRegViewKwd +syn keyword nsisSetRegViewKwd contained default lastused -"INSTALLER ATTRIBUTES - Uninstall configuration -syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption -syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText +"FUNCTIONS - general purpose (4.9.3) +syn keyword nsisInstruction contained CallInstDLL CreateDirectory GetDLLVersion +syn keyword nsisInstruction contained GetDLLVersionLocal GetFileTime GetFileTimeLocal +syn keyword nsisInstruction contained GetTempFileName SearchPath RegDLL UnRegDLL -"COMPILER ATTRIBUTES -syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave +syn keyword nsisInstruction contained CopyFiles nextgroup=nsisCopyFilesOpt skipwhite +syn region nsisCopyFilesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCopyFilesKwd +syn match nsisCopyFilesKwd contained "/\%(SILENT\|FILESONLY\)\>" +syn keyword nsisInstruction contained CreateShortcut nextgroup=nsisCreateShortcutOpt skipwhite +syn region nsisCreateShortcutOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCreateShortcutKwd +syn match nsisCreateShortcutKwd contained "/NoWorkingDir\>" -"FUNCTIONS - general purpose -syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell -syn keyword nsisInstruction Rename Delete RMDir +syn keyword nsisInstruction contained GetFullPathName nextgroup=nsisGetFullPathNameOpt skipwhite +syn region nsisGetFullPathNameOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetFullPathNameKwd +syn match nsisGetFullPathNameKwd contained "/SHORT\>" -"FUNCTIONS - registry & ini -syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin -syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr -syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey -syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr +syn keyword nsisInstruction contained SetFileAttributes nextgroup=nsisSetFileAttributesOpt skipwhite +syn region nsisSetFileAttributesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileAttrib +syn keyword nsisFileAttrib contained NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_TEMPORARY -"FUNCTIONS - general purpose, advanced -syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut -syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL -syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal -syn keyword nsisInstruction GetFileTime GetFileTimeLocal +"FUNCTIONS - Flow Control (4.9.4) +syn keyword nsisInstruction contained Abort Call ClearErrors GetCurrentAddress +syn keyword nsisInstruction contained GetFunctionAddress GetLabelAddress Goto +syn keyword nsisInstruction contained IfAbort IfErrors IfFileExists IfRebootFlag IfSilent +syn keyword nsisInstruction contained IntCmp IntCmpU Int64Cmp Int64CmpU IntPtrCmp IntPtrCmpU +syn keyword nsisInstruction contained Return Quit SetErrors StrCmp StrCmpS -"FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions -syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow -syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp -syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress -syn keyword nsisInstruction GetCurrentAddress +syn keyword nsisInstruction contained MessageBox nextgroup=nsisMessageBoxOpt skipwhite +syn region nsisMessageBoxOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisMessageBox +syn keyword nsisMessageBox contained MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL +syn keyword nsisMessageBox contained MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_USERICON +syn keyword nsisMessageBox contained MB_TOPMOST MB_SETFOREGROUND MB_RIGHT MB_RTLREADING +syn keyword nsisMessageBox contained MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 +syn keyword nsisMessageBox contained IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES +syn match nsisMessageBox contained "/SD\>" -"FUNCTIONS - File and directory i/o instructions -syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead -syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek +"FUNCTIONS - File and directory i/o instructions (4.9.5) +syn keyword nsisInstruction contained FileClose FileOpen FileRead FileReadUTF16LE +syn keyword nsisInstruction contained FileReadByte FileReadWord FileSeek FileWrite +syn keyword nsisInstruction contained FileWriteByte FileWriteWord +syn keyword nsisInstruction contained FindClose FindFirst FindNext -"FUNCTIONS - Misc instructions -syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint -syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext +syn keyword nsisInstruction contained FileWriteUTF16LE nextgroup=nsisFileWriteUTF16LEOpt skipwhite +syn region nsisFileWriteUTF16LEOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileWriteUTF16LEKwd +syn match nsisFileWriteUTF16LEKwd contained "/BOM\>" -"FUNCTIONS - String manipulation support -syn keyword nsisInstruction StrCpy StrLen +"FUNCTIONS - Uninstaller instructions (4.9.6) +syn keyword nsisInstruction contained WriteUninstaller -"FUNCTIONS - Stack support -syn keyword nsisInstruction Push Pop Exch +"FUNCTIONS - Misc instructions (4.9.7) +syn keyword nsisInstruction contained GetErrorLevel GetInstDirError InitPluginsDir Nop +syn keyword nsisInstruction contained SetErrorLevel Sleep -"FUNCTIONS - Integer manipulation support -syn keyword nsisInstruction IntOp IntFmt +syn keyword nsisInstruction contained SetShellVarContext nextgroup=nsisSetShellVarContextOpt skipwhite +syn region nsisSetShellVarContextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetShellVarContextKwd +syn keyword nsisSetShellVarContextKwd contained current all -"FUNCTIONS - Rebooting support -syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag +"FUNCTIONS - String manipulation support (4.9.8) +syn keyword nsisInstruction contained StrCpy StrLen -"FUNCTIONS - Uninstaller instructions -syn keyword nsisInstruction WriteUninstaller +"FUNCTIONS - Stack support (4.9.9) +syn keyword nsisInstruction contained Exch Push Pop -"FUNCTIONS - Install logging instructions -syn keyword nsisInstruction LogSet LogText +"FUNCTIONS - Integer manipulation support (4.9.10) +syn keyword nsisInstruction contained IntFmt Int64Fmt IntOp IntPtrOp -"FUNCTIONS - Section management instructions -syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText -syn keyword nsisInstruction SectionGetText +"FUNCTIONS - Rebooting support (4.9.11) +syn keyword nsisInstruction contained Reboot SetRebootFlag +"FUNCTIONS - Install logging instructions (4.9.12) +syn keyword nsisInstruction contained LogSet nextgroup=nsisOnOffOpt skipwhite +syn keyword nsisInstruction contained LogText -"SPECIAL FUNCTIONS - install +"FUNCTIONS - Section management instructions (4.9.13) +syn keyword nsisInstruction contained SectionSetFlags SectionGetFlags SectionSetText +syn keyword nsisInstruction contained SectionGetText SectionSetInstTypes SectionGetInstTypes +syn keyword nsisInstruction contained SectionSetSize SectionGetSize SetCurInstType GetCurInstType +syn keyword nsisInstruction contained InstTypeSetText InstTypeGetText + +"FUNCTIONS - User Interface Instructions (4.9.14) +syn keyword nsisInstruction contained BringToFront DetailPrint EnableWindow +syn keyword nsisInstruction contained FindWindow GetDlgItem HideWindow IsWindow +syn keyword nsisInstruction contained ShowWindow + +syn keyword nsisInstruction contained CreateFont nextgroup=nsisFontOpt skipwhite + +syn keyword nsisInstruction contained nextgroup=nsisBooleanOpt skipwhite + \ LockWindow SetAutoClose + +syn keyword nsisInstruction contained SendMessage nextgroup=nsisSendMessageOpt skipwhite +syn region nsisSendMessageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSendMessageKwd +syn match nsisSendMessageKwd contained "/TIMEOUT\>" + +syn keyword nsisInstruction contained SetBrandingImage nextgroup=nsisSetBrandingImageOpt skipwhite +syn region nsisSetBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetBrandingImageKwd +syn match nsisSetBrandingImageKwd contained "/\%(IMGID\|RESIZETOFIT\)\>" + +syn keyword nsisInstruction contained SetDetailsView nextgroup=nsisSetDetailsViewOpt skipwhite +syn region nsisSetDetailsViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsViewKwd +syn keyword nsisSetDetailsViewKwd contained show hide + +syn keyword nsisInstruction contained SetDetailsPrint nextgroup=nsisSetDetailsPrintOpt skipwhite +syn region nsisSetDetailsPrintOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsPrintKwd +syn keyword nsisSetDetailsPrintKwd contained none listonly textonly both lastused + +syn keyword nsisInstruction contained SetCtlColors nextgroup=nsisSetCtlColorsOpt skipwhite +syn region nsisSetCtlColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCtlColorsKwd +syn match nsisSetCtlColorsKwd contained "/BRANDING\>" + +syn keyword nsisInstruction contained SetSilent nextgroup=nsisSetSilentOpt skipwhite +syn region nsisSetSilentOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetSilentKwd +syn keyword nsisSetSilentKwd contained silent normal + + +"FUNCTIONS - Multiple Languages Instructions (4.9.15) +syn keyword nsisInstruction contained LoadLanguageFile LangString LicenseLangString + + +"SPECIAL FUNCTIONS - install (4.7.2.1) +syn match nsisCallback "\.onGUIInit" syn match nsisCallback "\.onInit" -syn match nsisCallback "\.onUserAbort" -syn match nsisCallback "\.onInstSuccess" syn match nsisCallback "\.onInstFailed" -syn match nsisCallback "\.onVerifyInstDir" -syn match nsisCallback "\.onNextPage" -syn match nsisCallback "\.onPrevPage" +syn match nsisCallback "\.onInstSuccess" +syn match nsisCallback "\.onGUIEnd" +syn match nsisCallback "\.onMouseOverSection" +syn match nsisCallback "\.onRebootFailed" syn match nsisCallback "\.onSelChange" +syn match nsisCallback "\.onUserAbort" +syn match nsisCallback "\.onVerifyInstDir" -"SPECIAL FUNCTIONS - uninstall +"SPECIAL FUNCTIONS - uninstall (4.7.2.2) +syn match nsisCallback "un\.onGUIInit" syn match nsisCallback "un\.onInit" +syn match nsisCallback "un\.onUninstFailed" +syn match nsisCallback "un\.onUninstSuccess" +syn match nsisCallback "un\.onGUIEnd" +syn match nsisCallback "un\.onRebootFailed" +syn match nsisCallback "un\.onSelChange" syn match nsisCallback "un\.onUserAbort" -syn match nsisCallback "un\.onInstSuccess" -syn match nsisCallback "un\.onInstFailed" -syn match nsisCallback "un\.onVerifyInstDir" -syn match nsisCallback "un\.onNextPage" -"STATEMENTS - sections -syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider -syn keyword nsisStatement AddSize +"COMPILER UTILITY (5.1) +syn match nsisInclude contained "!include\>" nextgroup=nsisIncludeOpt skipwhite +syn region nsisIncludeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIncludeKwd +syn match nsisIncludeKwd contained "/\%(NONFATAL\|CHARSET\)\>" + +syn match nsisSystem contained "!addincludedir\>" + +syn match nsisSystem contained "!addplugindir\>" nextgroup=nsisAddplugindirOpt skipwhite +syn region nsisAddplugindirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddplugindirKwd +syn match nsisAddplugindirKwd contained "/\%(x86-ansi\|x86-unicode\)\>" + +syn match nsisSystem contained "!appendfile\>" nextgroup=nsisAppendfileOpt skipwhite +syn region nsisAppendfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAppendfileKwd +syn match nsisAppendfileKwd contained "/\%(CHARSET\|RawNL\)\>" + +syn match nsisSystem contained "!cd\>" + +syn match nsisSystem contained "!delfile\>" nextgroup=nsisDelfileOpt skipwhite +syn region nsisDelfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDelfileKwd +syn match nsisDelfileKwd contained "/nonfatal\>" + +syn match nsisSystem contained "!echo\>" +syn match nsisSystem contained "!error\>" +syn match nsisSystem contained "!execute\>" +syn match nsisSystem contained "!makensis\>" +syn match nsisSystem contained "!packhdr\>" +syn match nsisSystem contained "!finalize\>" +syn match nsisSystem contained "!system\>" +syn match nsisSystem contained "!tempfile\>" +syn match nsisSystem contained "!getdllversion\>" +syn match nsisSystem contained "!gettlbversion\>" +syn match nsisSystem contained "!warning\>" + +syn match nsisSystem contained "!pragma\>" nextgroup=nsisPragmaOpt skipwhite +syn region nsisPragmaOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPragmaKwd +syn keyword nsisPragmaKwd contained enable disable default push pop + +syn match nsisSystem contained "!verbose\>" nextgroup=nsisVerboseOpt skipwhite +syn region nsisVerboseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVerboseKwd +syn keyword nsisVerboseKwd contained push pop + +"PREPROCESSOR (5.4) +syn match nsisDefine contained "!define\>" nextgroup=nsisDefineOpt skipwhite +syn region nsisDefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDefineKwd +syn match nsisDefineKwd contained "/\%(ifndef\|redef\|date\|utcdate\|math\|file\)\>" + +syn match nsisDefine contained "!undef\>" +syn match nsisPreCondit contained "!ifdef\>" +syn match nsisPreCondit contained "!ifndef\>" + +syn match nsisPreCondit contained "!if\>" nextgroup=nsisIfOpt skipwhite +syn region nsisIfOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIfKwd +syn match nsisIfKwd contained "/FileExists\>" -"STATEMENTS - functions -syn keyword nsisStatement Function FunctionEnd +syn match nsisPreCondit contained "!ifmacrodef\>" +syn match nsisPreCondit contained "!ifmacrondef\>" +syn match nsisPreCondit contained "!else\>" +syn match nsisPreCondit contained "!endif\>" +syn match nsisMacro contained "!insertmacro\>" +syn match nsisMacro contained "!macro\>" +syn match nsisMacro contained "!macroend\>" +syn match nsisMacro contained "!macroundef\>" -"STATEMENTS - pages -syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks +syn match nsisMacro contained "!searchparse\>" nextgroup=nsisSearchparseOpt skipwhite +syn region nsisSearchparseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchparseKwd +syn match nsisSearchparseKwd contained "/\%(ignorecase\|noerrors\|file\)\>" +syn match nsisMacro contained "!searchreplace\>" nextgroup=nsisSearchreplaceOpt skipwhite +syn region nsisSearchreplaceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchreplaceKwd +syn match nsisSearchreplaceKwd contained "/ignorecase\>" -"ERROR -syn keyword nsisError UninstallExeName " Define the default highlighting. @@ -225,32 +590,93 @@ syn keyword nsisError UninstallExeName hi def link nsisInstruction Function hi def link nsisComment Comment -hi def link nsisLocalLabel Label +hi def link nsisFirstComment Comment +hi def link nsisLocalLabel Label hi def link nsisGlobalLabel Label -hi def link nsisStatement Statement +hi def link nsisStatement Statement hi def link nsisString String hi def link nsisBoolean Boolean -hi def link nsisAttribOptions Constant -hi def link nsisExecShell Constant -hi def link nsisFileAttrib Constant -hi def link nsisMessageBox Constant -hi def link nsisRegistry Identifier +hi def link nsisOnOff Boolean +hi def link nsisFontKwd Constant +hi def link nsisLangKwd Constant +hi def link nsisPageKwd Constant +hi def link nsisPageExKwd Constant +hi def link nsisSectionKwd Constant +hi def link nsisSectionInKwd Constant +hi def link nsisSectionGroupKwd Constant +hi def link nsisVarKwd Constant +hi def link nsisAddBrandingImageKwd Constant +hi def link nsisBGGradientKwd Constant +hi def link nsisBrandingTextKwd Constant +hi def link nsisCRCCheckKwd Constant +hi def link nsisDirVerifyKwd Constant +hi def link nsisInstallColorsKwd Constant +hi def link nsisInstTypeKwd Constant +hi def link nsisLicenseBkColorKwd Constant +hi def link nsisLicenseForceSelectionKwd Constant +hi def link nsisManifestDPIAwareKwd Constant +hi def link nsisManifestSupportedOSKwd Constant +hi def link nsisRequestExecutionLevelKwd Constant +hi def link nsisShowInstDetailsKwd Constant +hi def link nsisSilentInstallKwd Constant +hi def link nsisSilentUnInstallKwd Constant +hi def link nsisSetCompressKwd Constant +hi def link nsisSetCompressorKwd Constant +hi def link nsisSetOverwriteKwd Constant +hi def link nsisDeleteKwd Constant +hi def link nsisExecShellKwd Constant +hi def link nsisFileKwd Constant +hi def link nsisReserveFileKwd Constant +hi def link nsisRMDirKwd Constant +hi def link nsisDeleteRegKeyKwd Constant +hi def link nsisWriteRegMultiStrKwd Constant +hi def link nsisSetRegViewKwd Constant +hi def link nsisCopyFilesKwd Constant +hi def link nsisCreateShortcutKwd Constant +hi def link nsisGetFullPathNameKwd Constant +hi def link nsisFileAttrib Constant +hi def link nsisMessageBox Constant +hi def link nsisFileWriteUTF16LEKwd Constant +hi def link nsisSetShellVarContextKwd Constant +hi def link nsisSendMessageKwd Constant +hi def link nsisSetBrandingImageKwd Constant +hi def link nsisSetDetailsViewKwd Constant +hi def link nsisSetDetailsPrintKwd Constant +hi def link nsisSetCtlColorsKwd Constant +hi def link nsisSetSilentKwd Constant +hi def link nsisRegistry Identifier hi def link nsisNumber Number hi def link nsisError Error hi def link nsisUserVar Identifier hi def link nsisSysVar Identifier -hi def link nsisAttribute Type -hi def link nsisCompiler Type +hi def link nsisAttribute Type +hi def link nsisCompiler Type +hi def link nsisVersionInfo Type hi def link nsisTodo Todo -hi def link nsisCallback Operator +hi def link nsisCallback Identifier " preprocessor commands hi def link nsisPreprocSubst PreProc +hi def link nsisPreprocLangStr PreProc +hi def link nsisPreprocEnvVar PreProc hi def link nsisDefine Define hi def link nsisMacro Macro -hi def link nsisPreCondit PreCondit +hi def link nsisPreCondit PreCondit hi def link nsisInclude Include hi def link nsisSystem PreProc +hi def link nsisLineContinuation Special +hi def link nsisIncludeKwd Constant +hi def link nsisAddplugindirKwd Constant +hi def link nsisAppendfileKwd Constant +hi def link nsisDelfileKwd Constant +hi def link nsisPragmaKwd Constant +hi def link nsisVerboseKwd Constant +hi def link nsisDefineKwd Constant +hi def link nsisIfKwd Constant +hi def link nsisSearchparseKwd Constant +hi def link nsisSearchreplaceKwd Constant let b:current_syntax = "nsis" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/pf.vim b/runtime/syntax/pf.vim index 81add10e7e..b928dc4fbb 100644 --- a/runtime/syntax/pf.vim +++ b/runtime/syntax/pf.vim @@ -2,12 +2,13 @@ " Language: OpenBSD packet filter configuration (pf.conf) " Original Author: Camiel Dobbelaar <cd@sentia.nl> " Maintainer: Lauri Tirkkonen <lotheac@iki.fi> -" Last Change: 2016 Jul 06 +" Last Change: 2018 Jul 16 if exists("b:current_syntax") finish endif +let b:current_syntax = "pf" setlocal foldmethod=syntax syn iskeyword @,48-57,_,-,+ syn sync fromstart @@ -17,7 +18,7 @@ syn keyword pfCmd anchor antispoof block include match pass queue syn keyword pfCmd queue set table syn match pfCmd /^\s*load\sanchor\>/ syn keyword pfTodo TODO XXX contained -syn keyword pfWildAddr all any +syn keyword pfWildAddr any no-route urpf-failed self syn match pfComment /#.*$/ contains=pfTodo syn match pfCont /\\$/ syn match pfErrClose /}/ @@ -36,57 +37,6 @@ syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfN syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar -syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor -syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep -syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors -syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver -syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver -syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls -syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo -syn keyword pfService at-nbp at-rtmp at-zis auth authentication -syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc -syn keyword pfService bootps canna cddb cddbp chargen chat cmd -syn keyword pfService cmip-agent cmip-man comsat conference -syn keyword pfService conserver courier csnet-ns cso-ns cvspserver -syn keyword pfService daap datametrics daytime dhcpd-sync -syn keyword pfService dhcpv6-client dhcpv6-server discard domain -syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc -syn keyword pfService exec finger ftp ftp-data git gopher hostname -syn keyword pfService hostnames hprop http https hunt hylafax iapp -syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock -syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc -syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos -syn keyword pfService kerberos-adm kerberos-iv kerberos-sec -syn keyword pfService kerberos_master kf kip klogin kpasswd kpop -syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx -syn keyword pfService l2tp ldap ldaps ldp link login mail mdns -syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s -syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm -syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs -syn keyword pfService netstat netwall newdate nextstep nfs nfsd -syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet -syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw -syn keyword pfService pop3s poppassd portmap postgresql postoffice -syn keyword pfService pptp presence printer prospero prospero-np -syn keyword pfService puppet pwdgen qotd quote radacct radius -syn keyword pfService radius-acct rdp readnews remotefs resource rfb -syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp -syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp -syn keyword pfService sa-msg-port sane-port sftp shell sieve silc -syn keyword pfService sink sip smtp smtps smux snmp snmp-trap -syn keyword pfService snmptrap snpp socks source spamd spamd-cfg -syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission -syn keyword pfService sunrpc supdup supfiledbg supfilesrv support -syn keyword pfService svn svrloc swat syslog syslog-tls systat -syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo -syn keyword pfService tftp time timed timeserver timserver tsap -syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp -syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan -syn keyword pfService wais webster who whod whois www x400 x400-snd -syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server -syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra -syn keyword pfService zebrasrv - hi def link pfCmd Statement hi def link pfComment Comment hi def link pfCont Statement @@ -103,4 +53,281 @@ hi def link pfVar Identifier hi def link pfVarAssign Identifier hi def link pfWildAddr Type -let b:current_syntax = "pf" +" from OpenBSD src/etc/services r1.95 +syn keyword pfService 802-11-iapp +syn keyword pfService Microsoft-SQL-Monitor +syn keyword pfService Microsoft-SQL-Server +syn keyword pfService NeXTStep +syn keyword pfService NextStep +syn keyword pfService afpovertcp +syn keyword pfService afs3-bos +syn keyword pfService afs3-callback +syn keyword pfService afs3-errors +syn keyword pfService afs3-fileserver +syn keyword pfService afs3-kaserver +syn keyword pfService afs3-prserver +syn keyword pfService afs3-rmtsys +syn keyword pfService afs3-update +syn keyword pfService afs3-vlserver +syn keyword pfService afs3-volser +syn keyword pfService amt-redir-tcp +syn keyword pfService amt-redir-tls +syn keyword pfService amt-soap-http +syn keyword pfService amt-soap-https +syn keyword pfService asf-rmcp +syn keyword pfService at-echo +syn keyword pfService at-nbp +syn keyword pfService at-rtmp +syn keyword pfService at-zis +syn keyword pfService auth +syn keyword pfService authentication +syn keyword pfService bfd-control +syn keyword pfService bfd-echo +syn keyword pfService bftp +syn keyword pfService bgp +syn keyword pfService bgpd +syn keyword pfService biff +syn keyword pfService bootpc +syn keyword pfService bootps +syn keyword pfService canna +syn keyword pfService cddb +syn keyword pfService cddbp +syn keyword pfService chargen +syn keyword pfService chat +syn keyword pfService cmd +syn keyword pfService cmip-agent +syn keyword pfService cmip-man +syn keyword pfService comsat +syn keyword pfService conference +syn keyword pfService conserver +syn keyword pfService courier +syn keyword pfService csnet-ns +syn keyword pfService cso-ns +syn keyword pfService cvspserver +syn keyword pfService daap +syn keyword pfService datametrics +syn keyword pfService daytime +syn keyword pfService dhcpd-sync +syn keyword pfService dhcpv6-client +syn keyword pfService dhcpv6-server +syn keyword pfService discard +syn keyword pfService domain +syn keyword pfService echo +syn keyword pfService efs +syn keyword pfService eklogin +syn keyword pfService ekshell +syn keyword pfService ekshell2 +syn keyword pfService epmap +syn keyword pfService eppc +syn keyword pfService exec +syn keyword pfService finger +syn keyword pfService ftp +syn keyword pfService ftp-data +syn keyword pfService git +syn keyword pfService gopher +syn keyword pfService gre-in-udp +syn keyword pfService gre-udp-dtls +syn keyword pfService hostname +syn keyword pfService hostnames +syn keyword pfService hprop +syn keyword pfService http +syn keyword pfService https +syn keyword pfService hunt +syn keyword pfService hylafax +syn keyword pfService iapp +syn keyword pfService icb +syn keyword pfService ident +syn keyword pfService imap +syn keyword pfService imap2 +syn keyword pfService imap3 +syn keyword pfService imaps +syn keyword pfService ingreslock +syn keyword pfService ipp +syn keyword pfService iprop +syn keyword pfService ipsec-msft +syn keyword pfService ipsec-nat-t +syn keyword pfService ipx +syn keyword pfService irc +syn keyword pfService isakmp +syn keyword pfService iscsi +syn keyword pfService isisd +syn keyword pfService iso-tsap +syn keyword pfService kauth +syn keyword pfService kdc +syn keyword pfService kerberos +syn keyword pfService kerberos-adm +syn keyword pfService kerberos-iv +syn keyword pfService kerberos-sec +syn keyword pfService kerberos_master +syn keyword pfService kf +syn keyword pfService kip +syn keyword pfService klogin +syn keyword pfService kpasswd +syn keyword pfService kpop +syn keyword pfService krb524 +syn keyword pfService krb_prop +syn keyword pfService krbupdate +syn keyword pfService krcmd +syn keyword pfService kreg +syn keyword pfService kshell +syn keyword pfService kx +syn keyword pfService l2tp +syn keyword pfService ldap +syn keyword pfService ldaps +syn keyword pfService ldp +syn keyword pfService link +syn keyword pfService login +syn keyword pfService mail +syn keyword pfService mdns +syn keyword pfService mdnsresponder +syn keyword pfService microsoft-ds +syn keyword pfService ms-sql-m +syn keyword pfService ms-sql-s +syn keyword pfService msa +syn keyword pfService msp +syn keyword pfService mtp +syn keyword pfService mysql +syn keyword pfService name +syn keyword pfService nameserver +syn keyword pfService netbios-dgm +syn keyword pfService netbios-ns +syn keyword pfService netbios-ssn +syn keyword pfService netnews +syn keyword pfService netplan +syn keyword pfService netrjs +syn keyword pfService netstat +syn keyword pfService netwall +syn keyword pfService newdate +syn keyword pfService nextstep +syn keyword pfService nfs +syn keyword pfService nfsd +syn keyword pfService nicname +syn keyword pfService nnsp +syn keyword pfService nntp +syn keyword pfService ntalk +syn keyword pfService ntp +syn keyword pfService null +syn keyword pfService openwebnet +syn keyword pfService ospf6d +syn keyword pfService ospfapi +syn keyword pfService ospfd +syn keyword pfService photuris +syn keyword pfService pop2 +syn keyword pfService pop3 +syn keyword pfService pop3pw +syn keyword pfService pop3s +syn keyword pfService poppassd +syn keyword pfService portmap +syn keyword pfService postgresql +syn keyword pfService postoffice +syn keyword pfService pptp +syn keyword pfService presence +syn keyword pfService printer +syn keyword pfService prospero +syn keyword pfService prospero-np +syn keyword pfService puppet +syn keyword pfService pwdgen +syn keyword pfService qotd +syn keyword pfService quote +syn keyword pfService radacct +syn keyword pfService radius +syn keyword pfService radius-acct +syn keyword pfService rdp +syn keyword pfService readnews +syn keyword pfService remotefs +syn keyword pfService resource +syn keyword pfService rfb +syn keyword pfService rfe +syn keyword pfService rfs +syn keyword pfService rfs_server +syn keyword pfService ripd +syn keyword pfService ripng +syn keyword pfService rje +syn keyword pfService rkinit +syn keyword pfService rlp +syn keyword pfService routed +syn keyword pfService router +syn keyword pfService rpc +syn keyword pfService rpcbind +syn keyword pfService rsync +syn keyword pfService rtelnet +syn keyword pfService rtsp +syn keyword pfService sa-msg-port +syn keyword pfService sane-port +syn keyword pfService sftp +syn keyword pfService shell +syn keyword pfService sieve +syn keyword pfService silc +syn keyword pfService sink +syn keyword pfService sip +syn keyword pfService smtp +syn keyword pfService smtps +syn keyword pfService smux +syn keyword pfService snmp +syn keyword pfService snmp-trap +syn keyword pfService snmptrap +syn keyword pfService snpp +syn keyword pfService socks +syn keyword pfService source +syn keyword pfService spamd +syn keyword pfService spamd-cfg +syn keyword pfService spamd-sync +syn keyword pfService spooler +syn keyword pfService spop3 +syn keyword pfService ssdp +syn keyword pfService ssh +syn keyword pfService submission +syn keyword pfService sunrpc +syn keyword pfService supdup +syn keyword pfService supfiledbg +syn keyword pfService supfilesrv +syn keyword pfService support +syn keyword pfService svn +syn keyword pfService svrloc +syn keyword pfService swat +syn keyword pfService syslog +syn keyword pfService syslog-tls +syn keyword pfService systat +syn keyword pfService tacacs +syn keyword pfService tacas+ +syn keyword pfService talk +syn keyword pfService tap +syn keyword pfService tcpmux +syn keyword pfService telnet +syn keyword pfService tempo +syn keyword pfService tftp +syn keyword pfService time +syn keyword pfService timed +syn keyword pfService timeserver +syn keyword pfService timserver +syn keyword pfService tsap +syn keyword pfService ttylink +syn keyword pfService ttytst +syn keyword pfService ub-dns-control +syn keyword pfService ulistserv +syn keyword pfService untp +syn keyword pfService usenet +syn keyword pfService users +syn keyword pfService uucp +syn keyword pfService uucp-path +syn keyword pfService uucpd +syn keyword pfService vnc +syn keyword pfService vxlan +syn keyword pfService wais +syn keyword pfService webster +syn keyword pfService who +syn keyword pfService whod +syn keyword pfService whois +syn keyword pfService www +syn keyword pfService x400 +syn keyword pfService x400-snd +syn keyword pfService xcept +syn keyword pfService xdmcp +syn keyword pfService xmpp-bosh +syn keyword pfService xmpp-client +syn keyword pfService xmpp-server +syn keyword pfService z3950 +syn keyword pfService zabbix-agent +syn keyword pfService zabbix-trapper +syn keyword pfService zebra +syn keyword pfService zebrasrv diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 6a81b8c631..5a7a2c3794 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: php PHP 3/4/5/7 " Maintainer: Jason Woofenden <jason@jasonwoof.com> -" Last Change: Jul 14, 2017 +" Last Change: Jun 20, 2018 " URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD " Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> " Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> @@ -446,7 +446,7 @@ if exists("php_folding") && php_folding==1 syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained syn match phpException "\(\s\|^\)finally\(\s\+.*}\)\@=" contained - set foldmethod=syntax + setlocal foldmethod=syntax syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop syn region phpFoldFunction matchgroup=Storageclass start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9 matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldHtmlInside,phpFCKeyword contained transparent fold extend syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@=" matchgroup=Delimiter end="^}" contains=@phpClFunction,phpFoldHtmlInside contained transparent fold extend @@ -460,7 +460,7 @@ else syn keyword phpException catch throw try finally contained syn keyword phpStorageClass final global private protected public static contained if exists("php_folding") && php_folding==2 - set foldmethod=syntax + setlocal foldmethod=syntax syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop syn region phpParent matchgroup=Delimiter start="{" end="}" contained contains=@phpClFunction,phpFoldHtmlInside transparent fold endif diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim index ccd122c46c..2c34cb4f38 100644 --- a/runtime/syntax/pike.vim +++ b/runtime/syntax/pike.vim @@ -1,59 +1,184 @@ " Vim syntax file -" Language: Pike -" Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> -" Last Change: 2001 May 10 +" Language: Pike +" Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Maintainer of previous implementation: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> +" Last Change: 2018 Jan 28 +" Version: 2.9 +" Remark: Derived from the C-syntax; fixed several bugs in the C-syntax +" Remark: and extended it with the Pike syntax. +" Remark: Includes a highlighter for all Pike types of parenthesis errors. +" Remark: Includes a highlighter for SQL on multiline strings. +" Remark: Includes a highlighter for any embedded Autodoc format. -" quit when a syntax file was already loaded +" Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif -" A bunch of useful C keywords -syn keyword pikeStatement goto break return continue -syn keyword pikeLabel case default -syn keyword pikeConditional if else switch -syn keyword pikeRepeat while for foreach do -syn keyword pikeStatement gauge destruct lambda inherit import typeof -syn keyword pikeException catch -syn keyword pikeType inline nomask private protected public static +let s:cpo_save = &cpo +set cpo&vim +" For multiline strings, try formatting them as SQL +syn include @pikeSQL <sfile>:p:h/sqloracle.vim +unlet b:current_syntax -syn keyword pikeTodo contained TODO FIXME XXX +" For embedded Autodoc documentation (WIP) +syn include @pikeAutodoc <sfile>:p:h/autodoc.vim +unlet b:current_syntax + +syn case match + +" Supports array, multiset, mapping multi-character delimiter matching +" Supports rotating amongst several same-level preprocessor conditionals +packadd! matchit +let b:match_words = "({:}\\@1<=),(\\[:]\\@1<=),(<:>\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" + +" A bunch of useful Pike keywords +syn keyword pikeDebug gauge backtrace describe_backtrace werror _Static_assert static_assert +syn keyword pikeException error catch throw +syn keyword pikeLabel case default break return continue +syn keyword pikeConditional if else switch +syn keyword pikeRepeat while for foreach do + +syn keyword pikePredef RegGetKeyNames RegGetValue RegGetValues +syn keyword pikePredef __automap__ __empty_program +syn keyword pikePredef __handle_sprintf_format __parse_pike_type _disable_threads +syn keyword pikePredef _do_call_outs _exit _gdb_breakpoint +syn keyword pikePredef abs access acos acosh add_constant alarm all_constants +syn keyword pikePredef array_sscanf asin asinh atan atan2 atanh atexit +syn keyword pikePredef basetype call_function call_out call_out_info cd ceil +syn keyword pikePredef combine_path combine_path_nt +syn keyword pikePredef combine_path_unix compile copy_value cos cosh cpp crypt +syn keyword pikePredef ctime decode_value delay encode_value encode_value_canonic +syn keyword pikePredef enumerate errno exece exit exp file_stat file_truncate +syn keyword pikePredef filesystem_stat find_call_out floor fork function_name +syn keyword pikePredef function_object function_program gc +syn keyword pikePredef get_active_compilation_handler get_active_error_handler +syn keyword pikePredef get_all_groups get_all_users get_dir get_groups_for_user +syn keyword pikePredef get_iterator get_profiling_info get_weak_flag getcwd +syn keyword pikePredef getgrgid getgrnam gethrdtime gethrtime gethrvtime getpid +syn keyword pikePredef getpwnam getpwuid getxattr glob gmtime has_index has_prefix +syn keyword pikePredef has_suffix has_value hash hash_7_0 hash_7_4 hash_8_0 +syn keyword pikePredef hash_value kill limit listxattr load_module localtime +syn keyword pikePredef log lower_case master max min mkdir mktime mv +syn keyword pikePredef object_program pow query_num_arg random_seed +syn keyword pikePredef remove_call_out removexattr replace_master rm round +syn keyword pikePredef set_priority set_weak_flag setxattr sgn signal signame +syn keyword pikePredef signum sin sinh sleep sort sprintf sqrt sscanf strerror +syn keyword pikePredef string_filter_non_unicode string_to_unicode string_to_utf8 +syn keyword pikePredef tan tanh time trace types ualarm unicode_to_string +syn keyword pikePredef upper_case utf8_to_string version + +syn keyword pikePredef write lock try_lock +syn keyword pikePredef MutexKey Timestamp Date Time TimeTZ Interval Inet Range +syn keyword pikePredef Null null inf nan + +syn keyword pikeTodo contained TODO FIXME XXX + +" Match parengroups: allows for highlighting indices of mappings and +" highlighting semicolons that are out of place due to a paren imbalance +syn cluster pikePreShort contains=pikeDefine,pikePreProc,pikeCppOutWrapper,pikeCppInWrapper,pikePreCondit,pikePreConditMatch +syn cluster pikeExprGroup contains=pikeMappIndex,@pikeStmt,pikeNest,@pikeBadGroup,pikeSoftCast +syn match pikeWord transparent contained /[^()'"[\]{},;:]\+/ contains=ALLBUT,@pikePreProcGroup,@pikeExprGroup +syn match pikeFirstWord transparent display contained /^\s*#[^()'"[\]{},;:]\+/ contains=@pikePreShort +syn cluster pikeMappElm contains=pikeMappIndex,@pikeStmt +syn cluster pikeStmt contains=pikeFirstWord,pikeCharacter,pikeString,pikeMlString,pikeWord,pikeNest +syn cluster pikeBadGroup contains=pikeBadPClose,pikeBadAClose,pikeBadBClose,pikeBadSPClose,pikeBadSAClose,pikeBadSBClose,pikeBadSClose,pikeBadSPAClose,pikeBadSBAClose +syn match pikeBadPClose display contained "[}\]]" +syn match pikeBadAClose display contained "[)\]]" +syn match pikeBadBClose display contained "[)}]" +syn match pikeBadSPClose display contained "[;}\]]" +syn match pikeBadSAClose display contained "[;)\]]" +syn match pikeBadSPAClose display contained "[;\]]" +syn match pikeBadSBAClose display contained "[;}]" +syn match pikeBadSClose display contained "[;)}\]]" +syn region pikeNest transparent start="(\@1<!{" end="}" contains=@pikeStmt,pikeUserLabel,pikeBadAClose +syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<!([[{<]\@!" end=")" contains=@pikeStmt,pikeBadSPClose +syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<=(" end=")" contains=@pikeStmt,pikeBadPClose +syn region pikeNest transparent start="(\@1<!\[" end="]" contains=@pikeStmt,pikeBadSBClose +syn region pikeNest transparent start="(\zs\[" end="])" contains=@pikeMappElm,pikeBadSBAClose +" For some reason specifying a matchgroup on the pikeNest below makes it +" override the shorter variant; consider it a kludge, no idea why it works +syn region pikeNest transparent matchgroup=pikeSoftCast start=%(\zs\[[ \t\v\r\n.a-zA-Z0-9_():,|]\+])\@!% end=")" contains=@pikeStmt +syn region pikeNest transparent start="(\zs{" end="})" contains=@pikeStmt,pikeBadSPAClose +syn region pikeNest transparent start="(\zs<" end=">)" contains=@pikeStmt,pikeBadSPClose keepend + +" It's easy to accidentally add a space after a backslash that was intended +" for line continuation. Some compilers allow it, which makes it +" unpredictable and should be avoided. +syn match pikeBadContinuation contained "\\\s\+$" + +" pikeCommentGroup allows adding matches for special things in comments +syn cluster pikeCommentGroup contains=pikeTodo,pikeBadContinuation " String and Character constants " Highlight special characters (those which have a backslash) differently -syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\." -syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial -syn match pikeCharacter "'[^\\]'" -syn match pikeSpecialCharacter "'\\.'" -syn match pikeSpecialCharacter "'\\[0-7][0-7]'" -syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'" - -" Compound data types -syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})' -syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])' -syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)' - -"catch errors caused by wrong parenthesis -syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField -syn match pikeParenError ")" -syn match pikeInParen contained "[^(][{}][^)]" +syn match pikeSpecial display contained "\\\%(x\x*\|d\d*\|\o\+\|u\x\{4}\|U\x\{8}\|[abefnrtv]\|$\)" + +" ISO C11 or ISO C++ 11 +if !exists("c_no_cformat") + " Highlight % items in strings. + syn match pikeFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjzt]\|ll\|hh\)\=\%([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + syn match pikeFormat display "%%" contained + syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,pikeFormat,@Spell keepend + syn region pikeMlString start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeFormat,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend +else + syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,@Spell + syn region pikeMlString transparent start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend +endif + +" Use SQL-syntax highlighting in multiline string if it starts with +" a standard SQL keyword +syn case ignore +" FIXME Use explicit newline match to cover up a bug in the regexp engine +" If the kludge is not used, the match will only start unless at least a space +" follows the initial doublequote on the first line (or the keyword is on +" the first line). +syn region pikeEmbeddedString contained start=+\%(#"\n\?\)\@2<=\_s*\%(SELECT\|INSERT\|UPDATE\|DELETE\|WITH\|CREATE\|DROP\|ALTER\)\>+ skip=+\\\\\|\\"+ end=+[\\#]\@1<!"+ contains=@pikeSQL,pikeBindings keepend +syn case match + +syn match pikeBindings display contained ":\@1<!:\I\i*" + +syn match pikeCharacter "'[^\\']'" contains=pikeDelimiterSQ +syn match pikeCharacter "'[^']*'" contains=pikeSpecial,pikeDelimiterSQ +syn match pikeSpecialError "'\\[^'\"?\\abefnrtv]'" +syn match pikeDelimiterDQ display +"+ contained +syn match pikeDelimiterSQ display +'+ contained + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match pikeSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match pikeSpaceError display " \+\ze\t" + endif +endif "integer number, or floating point number without a dot and with "f". syn case ignore -syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match pikeNumbers display transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctalError,pikeOctal +" Same, but without octal error (for comments) +syn match pikeNumbersCom display contained transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctal +syn match pikeNumber display contained "\<\d\+\%(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match pikeNumber display contained "\<0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match pikeOctal display contained "\<0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=pikeOctalZero +syn match pikeOctalZero display contained "\<0" "floating point number, with dot, optional exponent -syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match pikeFloat display contained "\<\d\+\%(f\|\.[0-9.]\@!\d*\%(e[-+]\=\d\+\)\=[fl]\=\)" "floating point number, starting with a dot, optional exponent -syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match pikeFloat display contained "[0-9.]\@1<!\.\d\+\%(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent -syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" -"hex number -syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" -"syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>" -syn case match +syn match pikeFloat display contained "\<\d\+e[-+]\=\d\+[fl]\=\>" + +"hexadecimal floating point number, two variants, with exponent +syn match pikeFloat display contained "\<0x\%(\x\+\.\?\|\x*\.\x\+\)p[-+]\=\d\+[fl]\=\>" + " flag an octal number with wrong digits -syn match pikeOctalError "\<0[0-7]*[89]" +syn match pikeOctalError display contained "\<0\o*[89]\d*" +syn case match if exists("c_comment_strings") " A comment can contain pikeString, pikeCharacter and pikeNumber. @@ -61,82 +186,201 @@ if exists("c_comment_strings") " need to use a special type of pikeString: pikeCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( - syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)" - syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip - syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial - syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat - syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber - syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber + syn match pikeCommentSkip contained "^\s*\*\%($\|\s\+\)" + syn region pikeCommentString contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\ze\*/+ contains=pikeSpecial,pikeCommentSkip + syn region pikeComment2String contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial + syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeComment2String,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord + if exists("c_no_comment_fold") + " Use "extend" here to have preprocessor lines not terminate halfway a + " comment. + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord + else + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord + endif else - syn region pikeComment start="/\*" end="\*/" contains=pikeTodo - syn match pikeComment "//.*" contains=pikeTodo - syn match pikeComment "#!.*" contains=pikeTodo + syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord + if exists("c_no_comment_fold") + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord + else + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord + endif endif -syntax match pikeCommentError "\*/" +" keep a // comment separately, it terminates a preproc. conditional +syn match pikeCommentError display "\*/" +syn match pikeCommentStartError display "/\ze\*" contained + +syn keyword pikeOperator sizeof +syn keyword pikeOperator typeof _typeof _refs +syn keyword pikeOperator zero_type intp stringp arrayp mappingp multisetp +syn keyword pikeOperator objectp functionp programp callablep destructedp +syn keyword pikeOperator object_variablep undefinedp +syn keyword pikeOperator allocate equal +syn keyword pikeOperator aggregate aggregate_mapping aggregate_multiset +syn keyword pikeOperator map filter search replace reverse column rows +syn keyword pikeOperator indices values mkmapping mkmultiset m_delete sort +syn keyword pikeOperator m_delete destruct +syn keyword pikeOperator create _destruct _sprintf cast _encode _decode +syn keyword pikeOperator __hash _sizeof _values _indices __INIT _equal +syn keyword pikeOperator _is_type _m_delete _get_iterator _search +syn keyword pikeOperator _serialize _deserialize _sqrt _types _random +syn keyword pikeOperator _size_object + +syn keyword pikeType int void +syn keyword pikeType float +syn keyword pikeType bool string array mapping multiset mixed +syn keyword pikeType object function program auto + +syn keyword pikeType this this_object this_program +syn keyword pikeType sprintf_args sprintf_format sprintf_result +syn keyword pikeType strict_sprintf_format + +syn keyword pikeStructure class enum typedef inherit import +syn keyword pikeTypedef typedef +syn keyword pikeStorageClass private protected public constant final variant +syn keyword pikeStorageClass optional inline extern static __deprecated__ lambda -syn keyword pikeOperator sizeof -syn keyword pikeType int string void float mapping array multiset mixed -syn keyword pikeType program object function +syn keyword pikeConstant __LINE__ __FILE__ __DIR__ __DATE__ __TIME__ +syn keyword pikeConstant __AUTO_BIGNUM__ __NT__ +syn keyword pikeConstant __BUILD__ __COUNTER__ _MAJOR__ __MINOR__ __VERSION__ +syn keyword pikeConstant __REAL_BUILD__ _REAL_MAJOR__ __REAL_MINOR__ +syn keyword pikeConstant __REAL_VERSION__ __PIKE__ UNDEFINED -syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError -syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn match pikeIncluded contained "<[^>]*>" -syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded -"syn match pikeLineSkip "\\$" -syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen -syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen +" These should actually only be parsed in preprocessor conditionals +syn keyword pikeCppOperator contained defined constant efun _Pragma + +syn keyword pikeBoolean true false + +syn match pikeCppPrefix display "^\s*\zs#\s*[a-z]\+" contained +syn region pikePreCondit start="^\s*#\s*\%(if\%(n\?def\)\?\|el\%(se\)\?if\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix +syn match pikePreConditMatch display "^\s*\zs#\s*\%(else\|endif\)\>" +if !exists("c_no_if0") + syn cluster pikeCppOutInGroup contains=pikeCppInIf,pikeCppInElse,pikeCppInElse2,pikeCppOutIf,pikeCppOutIf2,pikeCppOutElse,pikeCppInSkip,pikeCppOutSkip + syn region pikeCppOutWrapper start="^\s*\zs#\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=pikeCppOutIf,pikeCppOutElse,@NoSpell fold + syn region pikeCppOutIf contained start="0\+" matchgroup=pikeCppOutWrapper end="^\s*#\s*endif\>" contains=pikeCppOutIf2,pikeCppOutElse + if !exists("c_no_if0_fold") + syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell fold + else + syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell + endif + syn region pikeCppOutElse contained matchgroup=pikeCppOutWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit + syn region pikeCppInWrapper start="^\s*\zs#\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=pikeCppInIf,pikeCppInElse fold + syn region pikeCppInIf contained matchgroup=pikeCppInWrapper start="\d\+" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit + if !exists("c_no_if0_fold") + syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2 fold + else + syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2 + endif + syn region pikeCppInElse2 contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)\%([^/]\|/[^/*]\)*" end="^\ze\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip,@Spell + syn region pikeCppOutSkip contained start="^\s*#\s*if\%(n\?def\)\?\>" skip="\\$" end="^\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip + syn region pikeCppInSkip contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifn\?def\>\)" skip="\\$" end="^\s*#\s*endif\>" containedin=pikeCppOutElse,pikeCppInIf,pikeCppInSkip contains=TOP,pikePreProc +endif +syn region pikeIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeDelimiterDQ keepend +syn match pikeIncluded display contained "<[^>]*>" +syn match pikeInclude display "^\s*\zs#\s*include\>\s*["<]" contains=pikeIncluded +syn cluster pikePreProcGroup contains=pikeIncluded,pikeInclude,pikeEmbeddedString,pikeCppOutWrapper,pikeCppInWrapper,@pikeCppOutInGroup,pikeFormat,pikeMlString,pikeCommentStartError,@pikeBadGroup,pikeWord +syn region pikeDefine start="^\s*\zs#\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=@pikeStmt,@pikeBadGroup +syn region pikePreProc start="^\s*\zs#\s*\%(pragma\|charset\|pike\|require\|string\|line\|warning\|error\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix,@Spell,pikeConstant + +syn match pikeAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@pikeAutodoc containedin=pikeComment,pikeCommentL +syn cluster pikeCommentGroup add=pikeAutodocReal +syn cluster pikePreProcGroup add=pikeAutodocReal " Highlight User Labels -syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' -syn match pikeUserLabel "^\s*\I\i*\s*:$" -syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1 -syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1 -syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1 +syn match pikeUserLabel display "\%(^\|[{};]\)\zs\I\i*\s*\ze:\%([^:]\|$\)" contained contains=NONE +syn match pikeUserLabel display "\%(\<\%(break\|continue\)\_s\+\)\@10<=\I\i*" contained contains=NONE +syn match pikeUserLabel display "\%(\<case\)\@5<=\s\+[^<()[\]{},;:]\+\ze::\@!" contained contains=pikeDelimiterDQ,pikeDelimiterSQ -" Avoid recognizing most bitfields as labels -syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 -syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match pikeMappIndex display contained "[^<()[\]{},;:]\+\ze::\@!" contains=pikeDelimiterDQ,pikeDelimiterSQ +syn match pikeSoftCast display contained "\[[ \t\v\r\n.a-zA-Z0-9_():,|\+]" contains=NONE -syn sync ccomment pikeComment minlines=10 +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 400 " #if 0 constructs can be long + else + let b:c_minlines = 200 " mostly for multiline strings + endif +endif +exec "syn sync ccomment pikeComment minlines=" . b:c_minlines +syn sync match pikeMlStringSync grouphere pikeMlString +^[^"#]\+#\"+ +syn sync match pikeAutodocSync grouphere pikeCommentL "^\s*//!" " Define the default highlighting. -" Only when an item doesn't have highlighting yet - +" Only used when an item doesn't have highlighting yet +hi def link pikeFormat SpecialChar +hi def link pikeMlString String +hi def link pikeCommentL Comment +hi def link pikeCommentStart Comment hi def link pikeLabel Label -hi def link pikeUserLabel Label +hi def link pikeUserLabel Identifier hi def link pikeConditional Conditional hi def link pikeRepeat Repeat -hi def link pikeCharacter Character -hi def link pikeSpecialCharacter pikeSpecial +hi def link pikeCharacter Character +hi def link pikeDelimiterDQ Delimiter +hi def link pikeDelimiterSQ Delimiter hi def link pikeNumber Number +hi def link pikeOctal Number +hi def link pikeOctalZero PreProc " link this to Error if you want hi def link pikeFloat Float -hi def link pikeOctalError pikeError -hi def link pikeParenError pikeError -hi def link pikeInParen pikeError -hi def link pikeCommentError pikeError -hi def link pikeOperator Operator +hi def link pikeOctalError Error +hi def link pikeCommentError Error +hi def link pikeCommentStartError Error +hi def link pikeSpaceError Error +hi def link pikeSpecialError Error +hi def link pikeOperator Operator +hi def link pikeCppOperator Operator +hi def link pikeStructure Structure +hi def link pikeTypedef Typedef +hi def link pikeStorageClass StorageClass hi def link pikeInclude Include +hi def link pikeCppPrefix PreCondit hi def link pikePreProc PreProc hi def link pikeDefine Macro -hi def link pikeIncluded pikeString +hi def link pikeIncluded String hi def link pikeError Error -hi def link pikeStatement Statement -hi def link pikePreCondit PreCondit +hi def link pikeDebug Debug +hi def link pikeException Exception +hi def link pikeStatement Statement hi def link pikeType Type -hi def link pikeCommentError pikeError -hi def link pikeCommentString pikeString -hi def link pikeComment2String pikeString -hi def link pikeCommentSkip pikeComment +hi def link pikeConstant Constant +hi def link pikeBoolean Boolean +hi def link pikeCommentString String +hi def link pikeComment2String String +hi def link pikeCommentSkip Comment hi def link pikeString String hi def link pikeComment Comment hi def link pikeSpecial SpecialChar hi def link pikeTodo Todo -hi def link pikeException pikeStatement -hi def link pikeCompoundType Constant -"hi def link pikeIdentifier Identifier +hi def link pikeBadContinuation Error + +hi def link pikeCppInWrapper PreCondit +hi def link pikeCppOutWrapper PreCondit +hi def link pikePreConditMatch PreCondit + +hi def link pikeCppOutSkip Comment +hi def link pikeCppInElse2 Comment +hi def link pikeCppOutIf2 Comment +hi def link pikeCppOut Comment +hi def link pikePredef Statement +hi def link pikeBindings Identifier +hi def link pikeMappIndex Identifier +hi def link pikeSoftCast Type +hi def link pikeBadGroup Error +hi def link pikeBadPClose Error +hi def link pikeBadAClose Error +hi def link pikeBadBClose Error +hi def link pikeBadSPClose Error +hi def link pikeBadSAClose Error +hi def link pikeBadSBClose Error +hi def link pikeBadSPAClose Error +hi def link pikeBadSBAClose Error +hi def link pikeBadSClose Error let b:current_syntax = "pike" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index b50b9c60e5..3831ae1149 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: readline(3) configuration file +" Maintainer: Daniel Moch <daniel@danielmoch.com> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-06-25 -" readline_has_bash - if defined add support for bash specific -" settings/functions +" Latest Revision: 2018-07-26 +" Add new functions for Readline 7 / Bash 4.4 +" (credit: Github user bewuethr) if exists('b:current_syntax') finish @@ -110,7 +111,7 @@ syn keyword readlineKeyword contained \ nextgroup=readlineVariable \ skipwhite -syn keyword readlineVariable contained +syn keyword readlineVariable contained \ nextgroup=readlineBellStyle \ skipwhite \ bell-style @@ -119,12 +120,15 @@ syn keyword readlineVariable contained \ nextgroup=readlineBoolean \ skipwhite \ bind-tty-special-chars + \ blink-matching-paren + \ colored-completion-prefix \ colored-stats \ completion-ignore-case \ completion-map-case \ convert-meta \ disable-completion \ echo-control-characters + \ enable-bracketed-paste \ enable-keypad \ enable-meta-key \ expand-tilde @@ -152,6 +156,9 @@ syn keyword readlineVariable contained \ skipwhite \ comment-begin \ isearch-terminators + \ vi-cmd-mode-string + \ vi-ins-mode-string + \ emacs-mode-string syn keyword readlineVariable contained \ nextgroup=readlineNumber @@ -265,6 +272,7 @@ syn keyword readlineFunction contained \ start-kbd-macro \ end-kbd-macro \ call-last-kbd-macro + \ print-last-kbd-macro \ \ re-read-init-file \ abort @@ -335,6 +343,8 @@ syn keyword readlineFunction contained if exists("readline_has_bash") syn keyword readlineFunction contained + \ shell-forward-word + \ shell-backward-word \ shell-expand-line \ history-expand-line \ magic-space @@ -343,6 +353,8 @@ if exists("readline_has_bash") \ insert-last-argument \ operate-and-get-next \ forward-backward-delete-char + \ shell-kill-word + \ shell-backward-kill-word \ delete-char-or-list \ complete-filename \ possible-filename-completions @@ -355,6 +367,7 @@ if exists("readline_has_bash") \ complete-command \ possible-command-completions \ dynamic-complete-history + \ dabbrev-expand \ complete-into-braces \ glob-expand-word \ glob-list-expansions diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim index 232d2a7de3..d620d91f4a 100644 --- a/runtime/syntax/rst.vim +++ b/runtime/syntax/rst.vim @@ -3,7 +3,7 @@ " Maintainer: Marshall Ward <marshall.ward@gmail.com> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Website: https://github.com/marshallward/vim-restructuredtext -" Latest Revision: 2016-08-18 +" Latest Revision: 2018-07-23 if exists("b:current_syntax") finish @@ -50,7 +50,10 @@ syn cluster rstDirectives contains=rstFootnote,rstCitation, syn match rstExplicitMarkup '^\s*\.\.\_s' \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition -let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*' +" "Simple reference names are single words consisting of alphanumerics plus +" isolated (no two adjacent) internal hyphens, underscores, periods, colons +" and plus signs." +let s:ReferenceName = '[[:alnum:]]\%([-_.:+]\?[[:alnum:]]\+\)*' syn keyword rstTodo contained FIXME TODO XXX NOTE @@ -83,7 +86,7 @@ execute 'syn region rstExDirective contained matchgroup=rstDirective' . \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock' execute 'syn match rstSubstitutionDefinition contained' . - \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives' + \ ' /|.*|\_s\+/ nextgroup=@rstDirectives' function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right) execute 'syn region rst' . a:name . @@ -107,10 +110,10 @@ function! s:DefineInlineMarkup(name, start, middle, end) call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’') " TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters - call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|\%ua0\|[/:]\)', '') execute 'syn match rst' . a:name . - \ ' +\%(^\|\s\|[''"([{</:]\)\zs' . a:start . + \ ' +\%(^\|\s\|\%ua0\|[''"([{</:]\)\zs' . a:start . \ '[^[:space:]' . a:start[strlen(a:start) - 1] . ']' \ a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' @@ -124,14 +127,31 @@ call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') -syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" +" Sections are identified through their titles, which are marked up with +" adornment: "underlines" below the title text, or underlines and matching +" "overlines" above the title. An underline/overline is a single repeated +" punctuation character that begins in column 1 and forms a line extending at +" least as far as the right edge of the title text. +" +" It is difficult to count characters in a regex, but we at least special-case +" the case where the title has at least three characters to require the +" adornment to have at least three characters as well, in order to handle +" properly the case of a literal block: +" +" this is the end of a paragraph +" :: +" this is a literal block +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+$" + \ contains=@Spell +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1{2,}\n)?.{3,}\n([=`:.'"~^_*+#-])\2{2,}$" + \ contains=@Spell " TODO: Can’t remember why these two can’t be defined like the ones above. execute 'syn match rstFootnoteReference contains=@NoSpell' . - \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' + \ ' +\%(\s\|^\)\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' execute 'syn match rstCitationReference contains=@NoSpell' . - \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' + \ ' +\%(\s\|^\)\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' execute 'syn match rstHyperlinkReference' . \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/' @@ -140,28 +160,69 @@ syn match rstStandaloneHyperlink contains=@NoSpell \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]" syn region rstCodeBlock contained matchgroup=rstDirective - \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+ + \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+ \ skip=+^$+ \ end=+^\z1\@!+ \ contains=@NoSpell syn cluster rstDirectives add=rstCodeBlock if !exists('g:rst_syntax_code_list') - let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', - \ 'python', 'perl', 'sh'] + " A mapping from a Vim filetype to a list of alias patterns (pattern + " branches to be specific, see ':help /pattern'). E.g. given: + " + " let g:rst_syntax_code_list = { + " \ 'cpp': ['cpp', 'c++'], + " \ } + " + " then the respective contents of the following two rST directives: + " + " .. code:: cpp + " + " auto i = 42; + " + " .. code:: C++ + " + " auto i = 42; + " + " will both be highlighted as C++ code. As shown by the latter block + " pattern matching will be case-insensitive. + let g:rst_syntax_code_list = { + \ 'vim': ['vim'], + \ 'java': ['java'], + \ 'cpp': ['cpp', 'c++'], + \ 'lisp': ['lisp'], + \ 'php': ['php'], + \ 'python': ['python'], + \ 'perl': ['perl'], + \ 'sh': ['sh'], + \ } +elseif type(g:rst_syntax_code_list) == type([]) + " backward compatibility with former list format + let s:old_spec = g:rst_syntax_code_list + let g:rst_syntax_code_list = {} + for s:elem in s:old_spec + let g:rst_syntax_code_list[s:elem] = [s:elem] + endfor endif -for code in g:rst_syntax_code_list +for s:filetype in keys(g:rst_syntax_code_list) unlet! b:current_syntax " guard against setting 'isk' option which might cause problems (issue #108) let prior_isk = &l:iskeyword - exe 'syn include @rst'.code.' syntax/'.code.'.vim' - exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold' - \.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#' + let s:alias_pattern = '' + \.'\%(' + \.join(g:rst_syntax_code_list[s:filetype], '\|') + \.'\)' + + exe 'syn include @rst'.s:filetype.' syntax/'.s:filetype.'.vim' + exe 'syn region rstDirective'.s:filetype + \.' matchgroup=rstDirective fold' + \.' start="\c\%(sourcecode\|code\%(-block\)\=\)::\s\+'.s:alias_pattern.'\_s*\n\ze\z(\s\+\)"' \.' skip=#^$#' \.' end=#^\z1\@!#' - \.' contains=@NoSpell,@rst'.code - exe 'syn cluster rstDirectives add=rstDirective'.code + \.' contains=@NoSpell,@rst'.s:filetype + exe 'syn cluster rstDirectives add=rstDirective'.s:filetype + " reset 'isk' setting, if it has been changed if &l:iskeyword !=# prior_isk let &l:iskeyword = prior_isk @@ -169,6 +230,9 @@ for code in g:rst_syntax_code_list unlet! prior_isk endfor +" Enable top level spell checking +syntax spell toplevel + " TODO: Use better syncing. syn sync minlines=50 linebreaks=2 @@ -189,8 +253,6 @@ hi def link rstHyperlinkTarget String hi def link rstExDirective String hi def link rstSubstitutionDefinition rstDirective hi def link rstDelimiter Delimiter -hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic -hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold hi def link rstInterpretedTextOrHyperlinkReference Identifier hi def link rstInlineLiteral String hi def link rstSubstitutionReference PreProc @@ -200,6 +262,14 @@ hi def link rstCitationReference Identifier hi def link rstHyperLinkReference Identifier hi def link rstStandaloneHyperlink Identifier hi def link rstCodeBlock String +if exists('g:rst_use_emphasis_colors') + " TODO: Less arbitrary color selection + hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic + hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold +else + hi def rstEmphasis term=italic cterm=italic gui=italic + hi def rstStrongEmphasis term=bold cterm=bold gui=bold +endif let b:current_syntax = "rst" diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim index af9a659e07..e209729f57 100644 --- a/runtime/syntax/scheme.vim +++ b/runtime/syntax/scheme.vim @@ -1,328 +1,464 @@ " Vim syntax file -" Language: Scheme (R5RS + some R6RS extras) -" Last Change: 2016 May 23 -" Maintainer: Sergey Khorev <sergey.khorev@gmail.com> -" Original author: Dirk van Deun <dirk@igwe.vub.ac.be> - -" This script incorrectly recognizes some junk input as numerals: -" parsing the complete system of Scheme numerals using the pattern -" language is practically impossible: I did a lax approximation. - -" MzScheme extensions can be activated with setting is_mzscheme variable - -" Suggestions and bug reports are solicited by the author. - -" Initializing: - -" quit when a syntax file was already loaded -if exists("b:current_syntax") +" Language: Scheme (R7RS) +" Last Change: 2018-01-06 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" Previous Author: Dirk van Deun <dirk@igwe.vub.ac.be> +" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> +" URL: https://foldling.org/vim/syntax/scheme.vim + +if exists('b:current_syntax') finish endif -let s:cpo_save = &cpo +let s:cpo = &cpo set cpo&vim -syn case ignore - -" Fascist highlighting: everything that doesn't fit the rules is an error... - -syn match schemeError ![^ \t()\[\]";]*! -syn match schemeError ")" - -" Quoted and backquoted stuff - -syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -" Popular Scheme extension: -" using [] as well as () -syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL -syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL - -syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL -syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL - -syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -" R5RS Scheme Functions and Syntax: - -setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ - -syn keyword schemeSyntax lambda and or if cond case define let let* letrec -syn keyword schemeSyntax begin do delay set! else => -syn keyword schemeSyntax quote quasiquote unquote unquote-splicing -syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules -" R6RS -syn keyword schemeSyntax define-record-type fields protocol - -syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! -syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr -syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr -syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr -syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length -syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc -syn keyword schemeFunc symbol? symbol->string string->symbol number? complex? -syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >= -syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs -syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator -syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos -syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar -syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact -syn keyword schemeFunc inexact->exact number->string string->number char=? -syn keyword schemeFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=? -syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? -syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case? -syn keyword schemeFunc char-lower-case? -syn keyword schemeFunc char->integer integer->char char-upcase char-downcase -syn keyword schemeFunc string? make-string string string-length string-ref -syn keyword schemeFunc string-set! string=? string-ci=? string<? string-ci<? -syn keyword schemeFunc string>? string-ci>? string<=? string-ci<=? string>=? -syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector -syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure? -syn keyword schemeFunc apply map for-each call-with-current-continuation -syn keyword schemeFunc call-with-input-file call-with-output-file input-port? -syn keyword schemeFunc output-port? current-input-port current-output-port -syn keyword schemeFunc open-input-file open-output-file close-input-port -syn keyword schemeFunc close-output-port eof-object? read read-char peek-char -syn keyword schemeFunc write display newline write-char call/cc -syn keyword schemeFunc list-tail string->list list->string string-copy -syn keyword schemeFunc string-fill! vector->list list->vector vector-fill! -syn keyword schemeFunc force with-input-from-file with-output-to-file -syn keyword schemeFunc char-ready? load transcript-on transcript-off eval -syn keyword schemeFunc dynamic-wind port? values call-with-values -syn keyword schemeFunc scheme-report-environment null-environment -syn keyword schemeFunc interaction-environment -" R6RS -syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable -syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set! -syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update! -syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys -syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function -syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash -syn keyword schemeFunc find for-all exists filter partition fold-left fold-right -syn keyword schemeFunc remp remove remv remq memp assp cons* - -" ... so that a single + or -, inside a quoted context, would not be -" interpreted as a number (outside such contexts, it's a schemeFunc) - -syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1 -syn match schemeDelimiter !\.$! -" ... and a single dot is not a number but a delimiter - -" This keeps all other stuff unhighlighted, except *stuff* and <stuff>: - -syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*, -syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, - -syn match schemeOther "\.\.\." -syn match schemeError !\.\.\.[^ \t\[\]()";]\+! -" ... a special identifier - -syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1 -syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$, -syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, +syn match schemeParentheses "[^ '`\t\n()\[\]";]\+" +syn match schemeParentheses "[)\]]" -syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1 -syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, -syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, +syn match schemeIdentifier /[^ '`\t\n()\[\]"|;][^ '`\t\n()\[\]"|;]*/ -" Non-quoted lists, and strings: +syn region schemeQuote matchgroup=schemeData start=/'[`']*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeQuote matchgroup=schemeData start=/'['`]*"/ skip=/\\[\\"]/ end=/"/ +syn region schemeQuote matchgroup=schemeData start=/'['`]*|/ skip=/\\[\\|]/ end=/|/ +syn region schemeQuote matchgroup=schemeData start=/'['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL -syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL +syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuote,schemeQuoteForm,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL -syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL +syn region schemeUnquote matchgroup=schemeParentheses start=/,/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,@/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,@(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster -" Simple literals: -syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+ contains=@Spell +syn region schemeQuoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster +syn region schemeQuasiquoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -" Comments: +syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/ +syn region schemeSymbol start=/\(\\\)\@<!|/ skip=/\\[\\|]/ end=/|/ -syn match schemeComment ";.*$" contains=@Spell +syn match schemeNumber /\(#[dbeio]\)*[+\-]*\([0-9]\+\|inf.0\|nan.0\)\(\/\|\.\)\?[0-9+\-@\ilns]*\>/ +syn match schemeNumber /#x[+\-]*[0-9a-fA-F]\+\>/ +syn match schemeBoolean /#t\(rue\)\?/ +syn match schemeBoolean /#f\(alse\)\?/ -" Writing out the complete description of Scheme numerals without -" using variables is a day's work for a trained secretary... +syn match schemeCharacter /#\\.[^ `'\t\n\[\]()]*/ +syn match schemeCharacter /#\\x[0-9a-fA-F]\+/ -syn match schemeOther ![+-][ \t\[\]()";]!me=e-1 -syn match schemeOther ![+-]$! -" -" This is a useful lax approximation: -syn match schemeNumber "[-#+.]\=[0-9][-#+/0-9a-f@i.boxesfdl]*" -syn match schemeError ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t\[\]()";][^ \t\[\]()";]*! +syn match schemeComment /;.*$/ -syn match schemeBoolean "#[tf]" -syn match schemeError !#[tf][^ \t\[\]()";]\+! +syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment -syn match schemeCharacter "#\\" -syn match schemeCharacter "#\\." -syn match schemeError !#\\.[^ \t\[\]()";]\+! -syn match schemeCharacter "#\\space" -syn match schemeError !#\\space[^ \t\[\]()";]\+! -syn match schemeCharacter "#\\newline" -syn match schemeError !#\\newline[^ \t\[\]()";]\+! +syn region schemeForm matchgroup=schemeParentheses start="(" end=")" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster +syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster -" R6RS -syn match schemeCharacter "#\\x[0-9a-fA-F]\+" +syn region schemeVector matchgroup=schemeData start="#(" end=")" contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster +syn region schemeVector matchgroup=schemeData start="#[fsu]\d\+(" end=")" contains=schemeNumber,schemeComment,schemeDatumComment - -if exists("b:is_mzscheme") || exists("is_mzscheme") - " MzScheme extensions - " multiline comment - syn region schemeComment start="#|" end="|#" contains=@Spell - - " #%xxx are the special MzScheme identifiers - syn match schemeOther "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - " anything limited by |'s is identifier - syn match schemeOther "|[^|]\+|" - - syn match schemeCharacter "#\\\%(return\|tab\)" - - " Modules require stmt - syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename - " modules provide stmt - syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except - " Other from MzScheme - syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case - syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum - syn keyword schemeExtSyntax datum->syntax-object - syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0 - syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature - syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export - syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax - - syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker - syn keyword schemeExtFunc use-standard-linker use-standard-compiler - syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix - syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter - syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags - syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file - syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries - syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path - syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string - syn keyword schemeExtFunc get-output-string - " exceptions - syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch - syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port - syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read - syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch - syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch? - syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed? - syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char? - syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch? - " Command-line parsing - syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each - - " syntax quoting, unquoting and quasiquotation - syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL - syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL - syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL - - " Identifiers are very liberal in MzScheme/Racket - syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+! - - " Language setting - syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>" - - " Various number forms - syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>" - syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" - syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>" - syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>" +if exists('g:is_chicken') || exists('b:is_chicken') + syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\|import-syntax\|use\|require-extension\)\(-for-syntax\)\?\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment +else + syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\)\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment endif - -if exists("b:is_chicken") || exists("is_chicken") - " multiline comment - syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=@Spell,schemeMultilineComment - - syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - - syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec - syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library - syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension - syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record - syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type - syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv - syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax - syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno - - " here-string - syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ contains=@Spell - - if filereadable(expand("<sfile>:p:h")."/cpp.vim") - unlet! b:current_syntax - syn include @ChickenC <sfile>:p:h/cpp.vim - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC - endif - - " suggested by Alex Queiroz - syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ contains=@Spell +syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\|srfi\)\>" +syn region schemeImportForm matchgroup=schemeParentheses start="(" end=")" contained contains=schemeIdentifier,schemeComment,schemeDatumComment,@schemeImportCluster +syn cluster schemeImportCluster contains=schemeImportForm,schemeImportKeyword + +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*"/ skip=/\\[\\"]/ end=/"/ +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*|/ skip=/\\[\\|]/ end=/|/ +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*\(#\([usf]\d\+\)\?\)\?(/ end=/)/ contains=schemeDatumCommentForm +syn region schemeDatumCommentForm start="(" end=")" contained contains=schemeDatumCommentForm + +syn cluster schemeSyntaxCluster contains=schemeFunction,schemeKeyword,schemeSyntax,schemeExtraSyntax,schemeLibrarySyntax,schemeSyntaxSyntax + +syn keyword schemeLibrarySyntax define-library +syn keyword schemeLibrarySyntax export +syn keyword schemeLibrarySyntax include +syn keyword schemeLibrarySyntax include-ci +syn keyword schemeLibrarySyntax include-library-declarations +syn keyword schemeLibrarySyntax library +syn keyword schemeLibrarySyntax cond-expand + +syn keyword schemeSyntaxSyntax define-syntax +syn keyword schemeSyntaxSyntax let-syntax +syn keyword schemeSyntaxSyntax letrec-syntax +syn keyword schemeSyntaxSyntax syntax-rules + +syn keyword schemeSyntax => +syn keyword schemeSyntax and +syn keyword schemeSyntax begin +syn keyword schemeSyntax case +syn keyword schemeSyntax case-lambda +syn keyword schemeSyntax cond +syn keyword schemeSyntax define +syn keyword schemeSyntax define-record-type +syn keyword schemeSyntax define-values +syn keyword schemeSyntax delay +syn keyword schemeSyntax delay-force +syn keyword schemeSyntax do +syn keyword schemeSyntax else +syn keyword schemeSyntax guard +syn keyword schemeSyntax if +syn keyword schemeSyntax lambda +syn keyword schemeSyntax let +syn keyword schemeSyntax let* +syn keyword schemeSyntax let*-values +syn keyword schemeSyntax let-values +syn keyword schemeSyntax letrec +syn keyword schemeSyntax letrec* +syn keyword schemeSyntax or +syn keyword schemeSyntax parameterize +syn keyword schemeSyntax quasiquote +syn keyword schemeSyntax quote +syn keyword schemeSyntax set! +syn keyword schemeSyntax unless +syn keyword schemeSyntax unquote +syn keyword schemeSyntax unquote-splicing +syn keyword schemeSyntax when + +syn keyword schemeFunction * +syn keyword schemeFunction + +syn keyword schemeFunction - +syn keyword schemeFunction / +syn keyword schemeFunction < +syn keyword schemeFunction <= +syn keyword schemeFunction = +syn keyword schemeFunction > +syn keyword schemeFunction >= +syn keyword schemeFunction abs +syn keyword schemeFunction acos +syn keyword schemeFunction acos +syn keyword schemeFunction angle +syn keyword schemeFunction append +syn keyword schemeFunction apply +syn keyword schemeFunction asin +syn keyword schemeFunction assoc +syn keyword schemeFunction assq +syn keyword schemeFunction assv +syn keyword schemeFunction atan +syn keyword schemeFunction binary-port? +syn keyword schemeFunction boolean=? +syn keyword schemeFunction boolean? +syn keyword schemeFunction bytevector +syn keyword schemeFunction bytevector-append +syn keyword schemeFunction bytevector-append +syn keyword schemeFunction bytevector-copy +syn keyword schemeFunction bytevector-copy! +syn keyword schemeFunction bytevector-length +syn keyword schemeFunction bytevector-u8-ref +syn keyword schemeFunction bytevector-u8-set! +syn keyword schemeFunction bytevector? +syn keyword schemeFunction caaaar +syn keyword schemeFunction caaadr +syn keyword schemeFunction caaar +syn keyword schemeFunction caadar +syn keyword schemeFunction caaddr +syn keyword schemeFunction caadr +syn keyword schemeFunction caar +syn keyword schemeFunction cadaar +syn keyword schemeFunction cadadr +syn keyword schemeFunction cadar +syn keyword schemeFunction caddar +syn keyword schemeFunction cadddr +syn keyword schemeFunction caddr +syn keyword schemeFunction cadr +syn keyword schemeFunction call-with-current-continuation +syn keyword schemeFunction call-with-input-file +syn keyword schemeFunction call-with-output-file +syn keyword schemeFunction call-with-port +syn keyword schemeFunction call-with-values +syn keyword schemeFunction call/cc +syn keyword schemeFunction car +syn keyword schemeFunction cdaaar +syn keyword schemeFunction cdaadr +syn keyword schemeFunction cdaar +syn keyword schemeFunction cdadar +syn keyword schemeFunction cdaddr +syn keyword schemeFunction cdadr +syn keyword schemeFunction cdar +syn keyword schemeFunction cddaar +syn keyword schemeFunction cddadr +syn keyword schemeFunction cddar +syn keyword schemeFunction cdddar +syn keyword schemeFunction cddddr +syn keyword schemeFunction cdddr +syn keyword schemeFunction cddr +syn keyword schemeFunction cdr +syn keyword schemeFunction ceiling +syn keyword schemeFunction char->integer +syn keyword schemeFunction char-alphabetic? +syn keyword schemeFunction char-ci<=? +syn keyword schemeFunction char-ci<? +syn keyword schemeFunction char-ci=? +syn keyword schemeFunction char-ci>=? +syn keyword schemeFunction char-ci>? +syn keyword schemeFunction char-downcase +syn keyword schemeFunction char-foldcase +syn keyword schemeFunction char-lower-case? +syn keyword schemeFunction char-numeric? +syn keyword schemeFunction char-ready? +syn keyword schemeFunction char-upcase +syn keyword schemeFunction char-upper-case? +syn keyword schemeFunction char-whitespace? +syn keyword schemeFunction char<=? +syn keyword schemeFunction char<? +syn keyword schemeFunction char=? +syn keyword schemeFunction char>=? +syn keyword schemeFunction char>? +syn keyword schemeFunction char? +syn keyword schemeFunction close-input-port +syn keyword schemeFunction close-output-port +syn keyword schemeFunction close-port +syn keyword schemeFunction command-line +syn keyword schemeFunction complex? +syn keyword schemeFunction cons +syn keyword schemeFunction cos +syn keyword schemeFunction current-error-port +syn keyword schemeFunction current-input-port +syn keyword schemeFunction current-jiffy +syn keyword schemeFunction current-output-port +syn keyword schemeFunction current-second +syn keyword schemeFunction delete-file +syn keyword schemeFunction denominator +syn keyword schemeFunction digit-value +syn keyword schemeFunction display +syn keyword schemeFunction dynamic-wind +syn keyword schemeFunction emergency-exit +syn keyword schemeFunction environment +syn keyword schemeFunction eof-object +syn keyword schemeFunction eof-object? +syn keyword schemeFunction eq? +syn keyword schemeFunction equal? +syn keyword schemeFunction eqv? +syn keyword schemeFunction error +syn keyword schemeFunction error-object-irritants +syn keyword schemeFunction error-object-message +syn keyword schemeFunction error-object? +syn keyword schemeFunction eval +syn keyword schemeFunction even? +syn keyword schemeFunction exact +syn keyword schemeFunction exact->inexact +syn keyword schemeFunction exact-integer-sqrt +syn keyword schemeFunction exact-integer? +syn keyword schemeFunction exact? +syn keyword schemeFunction exit +syn keyword schemeFunction exp +syn keyword schemeFunction expt +syn keyword schemeFunction features +syn keyword schemeFunction file-error? +syn keyword schemeFunction file-exists? +syn keyword schemeFunction finite? +syn keyword schemeFunction floor +syn keyword schemeFunction floor-quotient +syn keyword schemeFunction floor-remainder +syn keyword schemeFunction floor/ +syn keyword schemeFunction flush-output-port +syn keyword schemeFunction for-each +syn keyword schemeFunction force +syn keyword schemeFunction gcd +syn keyword schemeFunction get-environment-variable +syn keyword schemeFunction get-environment-variables +syn keyword schemeFunction get-output-bytevector +syn keyword schemeFunction get-output-string +syn keyword schemeFunction imag-part +syn keyword schemeFunction inexact +syn keyword schemeFunction inexact->exact +syn keyword schemeFunction inexact? +syn keyword schemeFunction infinite? +syn keyword schemeFunction input-port-open? +syn keyword schemeFunction input-port? +syn keyword schemeFunction integer->char +syn keyword schemeFunction integer? +syn keyword schemeFunction interaction-environment +syn keyword schemeFunction jiffies-per-second +syn keyword schemeFunction lcm +syn keyword schemeFunction length +syn keyword schemeFunction list +syn keyword schemeFunction list->string +syn keyword schemeFunction list->vector +syn keyword schemeFunction list-copy +syn keyword schemeFunction list-ref +syn keyword schemeFunction list-set! +syn keyword schemeFunction list-tail +syn keyword schemeFunction list? +syn keyword schemeFunction load +syn keyword schemeFunction log +syn keyword schemeFunction magnitude +syn keyword schemeFunction make-bytevector +syn keyword schemeFunction make-list +syn keyword schemeFunction make-parameter +syn keyword schemeFunction make-polar +syn keyword schemeFunction make-promise +syn keyword schemeFunction make-rectangular +syn keyword schemeFunction make-string +syn keyword schemeFunction make-vector +syn keyword schemeFunction map +syn keyword schemeFunction max +syn keyword schemeFunction member +syn keyword schemeFunction memq +syn keyword schemeFunction memv +syn keyword schemeFunction min +syn keyword schemeFunction modulo +syn keyword schemeFunction nan? +syn keyword schemeFunction negative? +syn keyword schemeFunction newline +syn keyword schemeFunction not +syn keyword schemeFunction null-environment +syn keyword schemeFunction null? +syn keyword schemeFunction number->string +syn keyword schemeFunction number? +syn keyword schemeFunction numerator +syn keyword schemeFunction odd? +syn keyword schemeFunction open-binary-input-file +syn keyword schemeFunction open-binary-output-file +syn keyword schemeFunction open-input-bytevector +syn keyword schemeFunction open-input-file +syn keyword schemeFunction open-input-string +syn keyword schemeFunction open-output-bytevector +syn keyword schemeFunction open-output-file +syn keyword schemeFunction open-output-string +syn keyword schemeFunction output-port-open? +syn keyword schemeFunction output-port? +syn keyword schemeFunction pair? +syn keyword schemeFunction peek-char +syn keyword schemeFunction peek-u8 +syn keyword schemeFunction port? +syn keyword schemeFunction positive? +syn keyword schemeFunction procedure? +syn keyword schemeFunction promise? +syn keyword schemeFunction quotient +syn keyword schemeFunction raise +syn keyword schemeFunction raise-continuable +syn keyword schemeFunction rational? +syn keyword schemeFunction rationalize +syn keyword schemeFunction read +syn keyword schemeFunction read-bytevector +syn keyword schemeFunction read-bytevector! +syn keyword schemeFunction read-char +syn keyword schemeFunction read-error? +syn keyword schemeFunction read-line +syn keyword schemeFunction read-string +syn keyword schemeFunction read-u8 +syn keyword schemeFunction real-part +syn keyword schemeFunction real? +syn keyword schemeFunction remainder +syn keyword schemeFunction reverse +syn keyword schemeFunction round +syn keyword schemeFunction scheme-report-environment +syn keyword schemeFunction set-car! +syn keyword schemeFunction set-cdr! +syn keyword schemeFunction sin +syn keyword schemeFunction sqrt +syn keyword schemeFunction square +syn keyword schemeFunction string +syn keyword schemeFunction string->list +syn keyword schemeFunction string->number +syn keyword schemeFunction string->symbol +syn keyword schemeFunction string->utf8 +syn keyword schemeFunction string->vector +syn keyword schemeFunction string-append +syn keyword schemeFunction string-ci<=? +syn keyword schemeFunction string-ci<? +syn keyword schemeFunction string-ci=? +syn keyword schemeFunction string-ci>=? +syn keyword schemeFunction string-ci>? +syn keyword schemeFunction string-copy +syn keyword schemeFunction string-copy! +syn keyword schemeFunction string-downcase +syn keyword schemeFunction string-fill! +syn keyword schemeFunction string-foldcase +syn keyword schemeFunction string-for-each +syn keyword schemeFunction string-length +syn keyword schemeFunction string-map +syn keyword schemeFunction string-ref +syn keyword schemeFunction string-set! +syn keyword schemeFunction string-upcase +syn keyword schemeFunction string<=? +syn keyword schemeFunction string<? +syn keyword schemeFunction string=? +syn keyword schemeFunction string>=? +syn keyword schemeFunction string>? +syn keyword schemeFunction string? +syn keyword schemeFunction substring +syn keyword schemeFunction symbol->string +syn keyword schemeFunction symbol=? +syn keyword schemeFunction symbol? +syn keyword schemeFunction syntax-error +syn keyword schemeFunction tan +syn keyword schemeFunction textual-port? +syn keyword schemeFunction transcript-off +syn keyword schemeFunction transcript-on +syn keyword schemeFunction truncate +syn keyword schemeFunction truncate-quotient +syn keyword schemeFunction truncate-remainder +syn keyword schemeFunction truncate/ +syn keyword schemeFunction u8-ready? +syn keyword schemeFunction utf8->string +syn keyword schemeFunction values +syn keyword schemeFunction vector +syn keyword schemeFunction vector->list +syn keyword schemeFunction vector->string +syn keyword schemeFunction vector-append +syn keyword schemeFunction vector-copy +syn keyword schemeFunction vector-copy! +syn keyword schemeFunction vector-fill! +syn keyword schemeFunction vector-for-each +syn keyword schemeFunction vector-length +syn keyword schemeFunction vector-map +syn keyword schemeFunction vector-ref +syn keyword schemeFunction vector-set! +syn keyword schemeFunction vector? +syn keyword schemeFunction with-exception-handler +syn keyword schemeFunction with-input-from-file +syn keyword schemeFunction with-output-to-file +syn keyword schemeFunction write +syn keyword schemeFunction write-bytevector +syn keyword schemeFunction write-char +syn keyword schemeFunction write-shared +syn keyword schemeFunction write-simple +syn keyword schemeFunction write-string +syn keyword schemeFunction write-u8 +syn keyword schemeFunction zero? + +hi def link schemeBoolean Boolean +hi def link schemeCharacter Character +hi def link schemeComment Comment +hi def link schemeConstant Constant +hi def link schemeData Delimiter +hi def link schemeDatumComment Comment +hi def link schemeDatumCommentForm Comment +hi def link schemeDelimiter Delimiter +hi def link schemeError Error +hi def link schemeExtraSyntax Underlined +hi def link schemeFunction Function +hi def link schemeIdentifier Normal +hi def link schemeImport PreProc +hi def link schemeImportKeyword PreProc +hi def link schemeKeyword Type +hi def link schemeLibrarySyntax PreProc +hi def link schemeMultilineComment Comment +hi def link schemeNumber Number +hi def link schemeParentheses Normal +hi def link schemeQuasiquote Delimiter +hi def link schemeQuote Delimiter +hi def link schemeSpecialSyntax Special +hi def link schemeString String +hi def link schemeSymbol Normal +hi def link schemeSyntax Statement +hi def link schemeSyntaxSyntax PreProc +hi def link schemeTypeSyntax Type + +let b:did_scheme_syntax = 1 + +if exists('b:is_chicken') || exists('g:is_chicken') + exe 'ru! syntax/chicken.vim' endif -" Synchronization and the wrapping up... - -syn sync match matchPlace grouphere NONE "^[^ \t]" -" ... i.e. synchronize on a line that starts at the left margin - -" Define the default highlighting. -" Only when an item doesn't have highlighting yet - -hi def link schemeSyntax Statement -hi def link schemeFunc Function - -hi def link schemeString String -hi def link schemeCharacter Character -hi def link schemeNumber Number -hi def link schemeBoolean Boolean - -hi def link schemeDelimiter Delimiter -hi def link schemeConstant Constant - -hi def link schemeComment Comment -hi def link schemeMultilineComment Comment -hi def link schemeError Error - -hi def link schemeExtSyntax Type -hi def link schemeExtFunc PreProc - -hi def link schemeLang PreProc - - -let b:current_syntax = "scheme" - -let &cpo = s:cpo_save -unlet s:cpo_save +unlet b:did_scheme_syntax +let b:current_syntax = 'scheme' +let &cpo = s:cpo +unlet s:cpo diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 838c5eb4a7..167300c524 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Oct 02, 2017 -" Version: 172 +" Last Change: Jul 31, 2018 +" Version: 179 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) @@ -121,22 +121,22 @@ syn case match " Clusters: contains=@... clusters {{{1 "================================== syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_bash") syn cluster ErrorList add=shDTestError endif syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor syn cluster shArithList contains=@shArithParenList,shParenError -syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange -syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq -syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable +syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange +syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDo,shEcho,shExpr,shFor,shForPP,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq +syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial -syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial +syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError -syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote +syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest -syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shFunctionList add=shRepeat syn cluster shFunctionList add=shDblBrace,shDblParen @@ -144,12 +144,12 @@ endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload -syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr +syn cluster shIdList contains=shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm -syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator -syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr +syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator +syn cluster shTestList contains=shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS " Echo: {{{1 @@ -164,7 +164,7 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski " Alias: {{{1 " ===== -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn match shStatement "\<alias\>" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" @@ -186,7 +186,7 @@ if !exists("g:sh_no_error") syn match shCurlyError "}" syn match shParenError ")" syn match shOK '\.\(done\|fi\|in\|esac\)' - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_bash") syn match shDTestError "]]" endif syn match shTestError "]" @@ -245,12 +245,14 @@ ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_ ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn cluster shCaseList add=shRepeat syn cluster shFunctionList add=shRepeat - syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace - syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace - syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList + syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + if !exists("b:is_posix") + syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList + endif else syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList @@ -260,14 +262,15 @@ syn match shComma contained "," " Case: case...esac {{{1 " ==== -syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote -syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar +syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote +syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar +syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shCharClass if exists("b:is_bash") - ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment -else - ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment + ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment +else + ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment endif -ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList +ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote if exists("b:is_bash") @@ -287,8 +290,8 @@ endif " Misc: {{{1 "====== syn match shWrapLineOperator "\\$" -syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList -syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' +syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList +syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment " $() and $(()): {{{1 " $(..) is not supported by sh (Bourne shell). However, apparently @@ -315,7 +318,7 @@ if exists("b:is_bash") syn keyword bashStatement command compgen endif -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn cluster shCommandSubList add=kshSpecialVariables,kshStatement syn cluster shCaseList add=kshStatement syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL @@ -327,7 +330,7 @@ syn match shSource "^\.\s" syn match shSource "\s\.\s" "syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList "syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn match shColon '^\s*\zs:' endif @@ -339,24 +342,25 @@ syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained -endif -if exists("b:is_bash") syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt elseif !exists("g:sh_no_error") syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial endif -syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell -syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell +syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ +syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart +syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart syn match shStringSpecial "[^[:print:] \t]" contained -syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" -syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList +syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment +syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList +syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList +syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNxt contained "\\[\\"'`$()#]" -syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell -syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell +syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart +syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart " Comments: {{{1 "========== @@ -373,21 +377,22 @@ syn match shQuickComment contained "#.*$" " Here Documents: {{{1 " ========================================= -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t0-9|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t0-9|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" " Here Strings: {{{1 " ============= @@ -403,9 +408,11 @@ syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shVa syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote syn region shAtExpr contained start="@(" end=")" contains=@shIdList if exists("b:is_bash") + syn match shSet "^\s*set\ze\s*$" syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList - syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList -elseif exists("b:is_kornshell") + syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment +elseif exists("b:is_kornshell") || exists("b:is_posix") + syn match shSet "^\s*set\ze\s*$" syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList else @@ -439,14 +446,14 @@ syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList, syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList syn match shDerefSimple "\$\$" nextgroup=@shNoZSList syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList -if exists("b:is_bash") || exists("b:is_kornshell") +if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS endif " ksh: ${!var[*]} array index list syntax: {{{1 " ======================================== -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray endif @@ -464,7 +471,7 @@ syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefO syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList syn match shDerefVar contained '\d' nextgroup=@shDerefVarList -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif @@ -490,7 +497,7 @@ if !exists("g:sh_no_error") endif syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList -if exists("b:is_bash") || exists("b:is_kornshell") +if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern @@ -507,9 +514,9 @@ syn match shDerefString contained "\\["']" nextgroup=shDerefPattern if exists("b:is_bash") " bash : ${parameter:offset} " bash : ${parameter:offset:length} - syn region shDerefOff contained start=':' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple + syn region shDerefOff contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple - syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple + syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic " bash : ${parameter//pattern/string} " bash : ${parameter//pattern} @@ -537,7 +544,7 @@ endif " Useful ksh Keywords: {{{1 " ==================== -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence if exists("b:is_posix") syn keyword shStatement command @@ -587,6 +594,8 @@ if !exists("skip_sh_syntax_inits") hi def link shArithRegion shShellVariables hi def link shAstQuote shDoubleQuote hi def link shAtExpr shSetList + hi def link shBkslshSnglQuote shSingleQuote + hi def link shBkslshDblQuote shDOubleQuote hi def link shBeginHere shRedir hi def link shCaseBar shConditional hi def link shCaseCommandSub shCommandSub @@ -635,6 +644,7 @@ if !exists("skip_sh_syntax_inits") hi def link shSingleQuote shString hi def link shSource shOperator hi def link shStringSpecial shSpecial + hi def link shSpecialStart shSpecial hi def link shSubShRegion shOperator hi def link shTestOpr shConditional hi def link shTestPattern shString @@ -652,7 +662,7 @@ if !exists("skip_sh_syntax_inits") hi def link shDerefOff shDerefOp hi def link shDerefLen shDerefOff endif - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_posix") hi def link kshSpecialVariables shShellVariables hi def link kshStatement shStatement endif @@ -669,7 +679,7 @@ if !exists("skip_sh_syntax_inits") hi def link shInError Error hi def link shParenError Error hi def link shTestError Error - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_posix") hi def link shDTestError Error endif endif @@ -678,6 +688,7 @@ if !exists("skip_sh_syntax_inits") hi def link shCharClass Identifier hi def link shSnglCase Statement hi def link shCommandSub Special + hi def link shCommandSubBQ shCommandSub hi def link shComment Comment hi def link shConditional Conditional hi def link shCtrlSeq Special @@ -691,6 +702,8 @@ if !exists("skip_sh_syntax_inits") hi def link shSetList Identifier hi def link shShellVariables PreProc hi def link shSpecial Special + hi def link shSpecialDQ Special + hi def link shSpecialSQ Special hi def link shSpecialNoZS shSpecial hi def link shStatement Statement hi def link shString String @@ -725,6 +738,8 @@ if exists("b:is_bash") let b:current_syntax = "bash" elseif exists("b:is_kornshell") let b:current_syntax = "ksh" +elseif exists("b:is_posix") + let b:current_syntax = "posix" else let b:current_syntax = "sh" endif diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim index a14f15eef4..11ce2e0059 100644 --- a/runtime/syntax/snobol4.vim +++ b/runtime/syntax/snobol4.vim @@ -2,15 +2,16 @@ " Language: SNOBOL4 " Maintainer: Rafal Sulejman <rms@poczta.onet.pl> " Site: http://rms.republika.pl/vim/syntax/snobol4.vim -" Last change: 2006 may 10 +" Last change: : Thu, 25 Jan 2018 14:21:24 +0100 " Changes: +" - system variables updated for SNOBOL4 2.0+ " - strict snobol4 mode (set snobol4_strict_mode to activate) " - incorrect HL of dots in strings corrected " - incorrect HL of dot-variables in parens corrected " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. -" quit when a syntax file was already loaded +" Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif @@ -59,7 +60,7 @@ syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1 syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" syn match snobol4BogusSysVar "&\w\{1,}" -syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)" +syn match snobol4SysVar "&\<\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|digits\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)\>" syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)" syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*" syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)" @@ -100,11 +101,11 @@ hi def link snobol4ErrInBracket snobol4Error hi def link snobol4SysVar Keyword hi def link snobol4BogusSysVar snobol4Error if exists("snobol4_strict_mode") -hi def link snobol4ExtSysVar WarningMsg -hi def link snobol4ExtKeyword WarningMsg + hi def link snobol4ExtSysVar WarningMsg + hi def link snobol4ExtKeyword WarningMsg else -hi def link snobol4ExtSysVar snobol4SysVar -hi def link snobol4ExtKeyword snobol4Keyword + hi def link snobol4ExtSysVar snobol4SysVar + hi def link snobol4ExtKeyword snobol4Keyword endif diff --git a/runtime/syntax/sqloracle.vim b/runtime/syntax/sqloracle.vim index bf2862f497..0907b48f0e 100644 --- a/runtime/syntax/sqloracle.vim +++ b/runtime/syntax/sqloracle.vim @@ -4,12 +4,15 @@ " Repository: https://github.com/chrisbra/vim-sqloracle-syntax " License: Vim " Previous Maintainer: Paul Moore -" Last Change: 2016 Jul 22 +" Last Change: 2018 June 24 " Changes: " 02.04.2016: Support for when keyword " 03.04.2016: Support for join related keywords " 22.07.2016: Support Oracle Q-Quote-Syntax +" 25.07.2016: Support for Oracle N'-Quote syntax +" 22.06.2018: Remove skip part for sqlString (do not escape strings) +" (https://web.archive.org/web/20150922065035/https://mariadb.com/kb/en/sql-99/character-string-literals/) if exists("b:current_syntax") finish @@ -49,12 +52,14 @@ syn keyword sqlStatement truncate " next ones are contained, so folding works. syn keyword sqlStatement create update alter select insert contained -syn keyword sqlType boolean char character date float integer long -syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray +syn keyword sqlType bfile blob boolean char character clob date datetime +syn keyword sqlType dec decimal float int integer long mlslabel nchar +syn keyword sqlType nclob number numeric nvarchar2 precision raw rowid +syn keyword sqlType smallint real timestamp urowid varchar varchar2 varray " Strings: -syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+ +syn region sqlString matchgroup=Quote start=+n\?"+ end=+"+ +syn region sqlString matchgroup=Quote start=+n\?'+ end=+'+ syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+ syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+ syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+ @@ -67,6 +72,7 @@ syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold syn match sqlComment "--.*$" contains=sqlTodo,@Spell +syn match sqlComment "^rem.*$" contains=sqlTodo,@Spell " Setup Folding: " this is a hack, to get certain statements folded. @@ -128,15 +134,15 @@ syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xml syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained " Define the default highlighting. -hi def link Quote Special -hi def link sqlComment Comment -hi def link sqlFunction Function -hi def link sqlKeyword sqlSpecial -hi def link sqlNumber Number -hi def link sqlOperator sqlStatement -hi def link sqlSpecial Special +hi def link Quote Special +hi def link sqlComment Comment +hi def link sqlFunction Function +hi def link sqlKeyword sqlSpecial +hi def link sqlNumber Number +hi def link sqlOperator sqlStatement +hi def link sqlSpecial Special hi def link sqlStatement Statement -hi def link sqlString String +hi def link sqlString String hi def link sqlType Type hi def link sqlTodo Todo diff --git a/runtime/syntax/sudoers.vim b/runtime/syntax/sudoers.vim index df1eb99b42..31f5f2b7ed 100644 --- a/runtime/syntax/sudoers.vim +++ b/runtime/syntax/sudoers.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: sudoers(5) configuration files " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2011-02-24 +" Latest Revision: 2018-07-19 +" Recent Changes: Support for #include and #includedir. if exists("b:current_syntax") finish @@ -24,6 +25,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS syn keyword sudoersTodo contained TODO FIXME XXX NOTE syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo +syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$' syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl @@ -335,6 +337,7 @@ hi def link sudoersIntegerValue Number hi def link sudoersStringValue String hi def link sudoersListValue String hi def link sudoersPASSWD Special +hi def link sudoersInclude Statement let b:current_syntax = "sudoers" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index d5a5de65c8..d5f900ae5c 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> -" Last Change: Oct 12, 2017 -" Version: 105 +" Last Change: Mar 30, 2018 +" Version: 109 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -396,8 +396,8 @@ endif " Bad Math (mismatched): {{{1 if !exists("g:tex_no_math") && !s:tex_no_error - syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" - syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" + syn match texBadMath "\\end\s*{\s*\(array\|[bBpvV]matrix\|split\|smallmatrix\)\s*}" + syn match texBadMath "\\end\s*{\s*\(displaymath\|equation\|eqnarray\|math\)\*\=\s*}" syn match texBadMath "\\[\])]" endif @@ -436,17 +436,10 @@ if !exists("g:tex_no_math") endfun " Standard Math Zones: {{{2 - call TexNewMathZone("A","align",1) - call TexNewMathZone("B","alignat",1) - call TexNewMathZone("C","displaymath",1) - call TexNewMathZone("D","eqnarray",1) - call TexNewMathZone("E","equation",1) - call TexNewMathZone("F","flalign",1) - call TexNewMathZone("G","gather",1) - call TexNewMathZone("H","math",1) - call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","xalignat",1) - call TexNewMathZone("K","xxalignat",0) + call TexNewMathZone("A","displaymath",1) + call TexNewMathZone("B","eqnarray",1) + call TexNewMathZone("C","equation",1) + call TexNewMathZone("D","math",1) " Inline Math Zones: {{{2 if s:tex_fast =~# 'M' @@ -1019,6 +1012,48 @@ if has("conceal") && &enc == 'utf-8' syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ " syn match texMathSymbol '\\bar{a}' contained conceal cchar=a̅ + + syn match texMathSymbol '\\dot{B}' contained conceal cchar=Ḃ + syn match texMathSymbol '\\dot{b}' contained conceal cchar=ḃ + syn match texMathSymbol '\\dot{D}' contained conceal cchar=Ḋ + syn match texMathSymbol '\\dot{d}' contained conceal cchar=ḋ + syn match texMathSymbol '\\dot{F}' contained conceal cchar=Ḟ + syn match texMathSymbol '\\dot{f}' contained conceal cchar=ḟ + syn match texMathSymbol '\\dot{H}' contained conceal cchar=Ḣ + syn match texMathSymbol '\\dot{h}' contained conceal cchar=ḣ + syn match texMathSymbol '\\dot{M}' contained conceal cchar=Ṁ + syn match texMathSymbol '\\dot{m}' contained conceal cchar=ṁ + syn match texMathSymbol '\\dot{N}' contained conceal cchar=Ṅ + syn match texMathSymbol '\\dot{n}' contained conceal cchar=ṅ + syn match texMathSymbol '\\dot{P}' contained conceal cchar=Ṗ + syn match texMathSymbol '\\dot{p}' contained conceal cchar=ṗ + syn match texMathSymbol '\\dot{R}' contained conceal cchar=Ṙ + syn match texMathSymbol '\\dot{r}' contained conceal cchar=ṙ + syn match texMathSymbol '\\dot{S}' contained conceal cchar=Ṡ + syn match texMathSymbol '\\dot{s}' contained conceal cchar=ṡ + syn match texMathSymbol '\\dot{T}' contained conceal cchar=Ṫ + syn match texMathSymbol '\\dot{t}' contained conceal cchar=ṫ + syn match texMathSymbol '\\dot{W}' contained conceal cchar=Ẇ + syn match texMathSymbol '\\dot{w}' contained conceal cchar=ẇ + syn match texMathSymbol '\\dot{X}' contained conceal cchar=Ẋ + syn match texMathSymbol '\\dot{x}' contained conceal cchar=ẋ + syn match texMathSymbol '\\dot{Y}' contained conceal cchar=Ẏ + syn match texMathSymbol '\\dot{y}' contained conceal cchar=ẏ + syn match texMathSymbol '\\dot{Z}' contained conceal cchar=Ż + syn match texMathSymbol '\\dot{z}' contained conceal cchar=ż + + syn match texMathSymbol '\\dot{C}' contained conceal cchar=Ċ + syn match texMathSymbol '\\dot{c}' contained conceal cchar=ċ + syn match texMathSymbol '\\dot{E}' contained conceal cchar=Ė + syn match texMathSymbol '\\dot{e}' contained conceal cchar=ė + syn match texMathSymbol '\\dot{G}' contained conceal cchar=Ġ + syn match texMathSymbol '\\dot{g}' contained conceal cchar=ġ + syn match texMathSymbol '\\dot{I}' contained conceal cchar=İ + + syn match texMathSymbol '\\dot{A}' contained conceal cchar=Ȧ + syn match texMathSymbol '\\dot{a}' contained conceal cchar=ȧ + syn match texMathSymbol '\\dot{O}' contained conceal cchar=Ȯ + syn match texMathSymbol '\\dot{o}' contained conceal cchar=ȯ endif " Greek {{{2 diff --git a/runtime/syntax/tmux.vim b/runtime/syntax/tmux.vim index 1ba5f67736..62c0ce521a 100644 --- a/runtime/syntax/tmux.vim +++ b/runtime/syntax/tmux.vim @@ -1,5 +1,5 @@ " Language: tmux(1) configuration file -" Version: 2.3 (git-14dc2ac) +" Version: 2.7 (git-e4e060f2) " URL: https://github.com/ericpruitt/tmux.vim/ " Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) @@ -14,7 +14,7 @@ let s:original_cpo = &cpo set cpo&vim let b:current_syntax = "tmux" -setlocal iskeyword+=- +syntax iskeyword @,48-57,_,192-255,- syntax case match syn keyword tmuxAction none any current other @@ -24,7 +24,7 @@ syn keyword tmuxTodo FIXME NOTE TODO XXX contained syn match tmuxColour /\<colour[0-9]\+/ display syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display -syn match tmuxNumber /\d\+/ display +syn match tmuxNumber /\<\d\+\>/ display syn match tmuxFlags /\s-\a\+/ display syn match tmuxVariable /\w\+=/ display syn match tmuxVariableExpansion /\${\=\w\+}\=/ display @@ -62,30 +62,30 @@ for s:i in range(0, 255) endfor syn keyword tmuxOptions -\ buffer-limit command-alias default-terminal escape-time exit-unattached -\ focus-events history-file message-limit set-clipboard terminal-overrides -\ assume-paste-time base-index bell-action bell-on-alert default-command +\ buffer-limit command-alias default-terminal escape-time exit-empty +\ activity-action assume-paste-time base-index bell-action default-command \ default-shell destroy-unattached detach-on-destroy \ display-panes-active-colour display-panes-colour display-panes-time -\ display-time history-limit key-table lock-after-time lock-command -\ message-attr message-bg message-command-attr message-command-bg -\ message-command-fg message-command-style message-fg message-style mouse -\ prefix prefix2 renumber-windows repeat-time set-titles set-titles-string +\ display-time exit-unattached focus-events history-file history-limit +\ key-table lock-after-time lock-command message-attr message-bg +\ message-command-attr message-command-bg message-command-fg +\ message-command-style message-fg message-limit message-style mouse +\ aggressive-resize allow-rename alternate-screen automatic-rename +\ automatic-rename-format clock-mode-colour clock-mode-style force-height +\ force-width main-pane-height main-pane-width mode-attr mode-bg mode-fg +\ mode-keys mode-style monitor-activity monitor-bell monitor-silence +\ other-pane-height other-pane-width pane-active-border-bg +\ pane-active-border-fg pane-active-border-style pane-base-index +\ pane-border-bg pane-border-fg pane-border-format pane-border-status +\ pane-border-style prefix prefix2 remain-on-exit renumber-windows +\ repeat-time set-clipboard set-titles set-titles-string silence-action \ status status-attr status-bg status-fg status-interval status-justify \ status-keys status-left status-left-attr status-left-bg status-left-fg \ status-left-length status-left-style status-position status-right \ status-right-attr status-right-bg status-right-fg status-right-length -\ status-right-style status-style update-environment visual-activity -\ visual-bell visual-silence word-separators aggressive-resize allow-rename -\ alternate-screen automatic-rename automatic-rename-format -\ clock-mode-colour clock-mode-style force-height force-width -\ main-pane-height main-pane-width mode-attr mode-bg mode-fg mode-keys -\ mode-style monitor-activity monitor-silence other-pane-height -\ other-pane-width pane-active-border-bg pane-active-border-fg -\ pane-active-border-style pane-base-index pane-border-bg pane-border-fg -\ pane-border-format pane-border-status pane-border-style remain-on-exit -\ synchronize-panes window-active-style window-style -\ window-status-activity-attr window-status-activity-bg +\ status-right-style status-style synchronize-panes terminal-overrides +\ update-environment user-keys visual-activity visual-bell visual-silence +\ window-active-style window-status-activity-attr window-status-activity-bg \ window-status-activity-fg window-status-activity-style window-status-attr \ window-status-bell-attr window-status-bell-bg window-status-bell-fg \ window-status-bell-style window-status-bg window-status-current-attr @@ -93,32 +93,31 @@ syn keyword tmuxOptions \ window-status-current-format window-status-current-style window-status-fg \ window-status-format window-status-last-attr window-status-last-bg \ window-status-last-fg window-status-last-style window-status-separator -\ window-status-style wrap-search xterm-keys +\ window-status-style window-style word-separators wrap-search xterm-keys syn keyword tmuxCommands -\ attach-session attach bind-key bind break-pane breakp capture-pane -\ capturep clear-history clearhist choose-buffer choose-client choose-tree -\ choose-session choose-window command-prompt confirm-before confirm -\ copy-mode clock-mode detach-client detach suspend-client suspendc -\ display-message display display-panes displayp find-window findw if-shell -\ if join-pane joinp move-pane movep kill-pane killp kill-server -\ start-server start kill-session kill-window killw unlink-window unlinkw -\ list-buffers lsb list-clients lsc list-keys lsk list-commands lscm -\ list-panes lsp list-sessions ls list-windows lsw load-buffer loadb -\ lock-server lock lock-session locks lock-client lockc move-window movew -\ link-window linkw new-session new has-session has new-window neww -\ paste-buffer pasteb pipe-pane pipep refresh-client refresh rename-session -\ rename rename-window renamew resize-pane resizep respawn-pane respawnp -\ respawn-window respawnw rotate-window rotatew run-shell run save-buffer -\ saveb show-buffer showb select-layout selectl next-layout nextl -\ previous-layout prevl select-pane selectp last-pane lastp select-window -\ selectw next-window next previous-window prev last-window last send-keys -\ send send-prefix set-buffer setb delete-buffer deleteb set-environment -\ setenv set-hook show-hooks set-option set set-window-option setw -\ show-environment showenv show-messages showmsgs show-options show -\ show-window-options showw source-file source split-window splitw swap-pane -\ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for -\ wait +\ attach attach-session bind bind-key break-pane breakp capture-pane +\ capturep choose-buffer choose-client choose-tree clear-history clearhist +\ clock-mode command-prompt confirm confirm-before copy-mode detach +\ detach-client display display-message display-panes displayp find-window +\ findw if if-shell join-pane joinp kill-pane kill-server kill-session +\ kill-window killp has-session has killw link-window linkw list-buffers +\ list-clients list-commands list-keys list-panes list-sessions list-windows +\ load-buffer loadb lock lock-client lock-server lock-session last-pane +\ lastp lockc locks last-window last ls lsb delete-buffer deleteb lsc lscm +\ lsk lsp lsw move-pane move-window movep movew new new-session new-window +\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane +\ pipep prev previous-layout previous-window prevl refresh refresh-client +\ rename rename-session rename-window renamew resize-pane resizep +\ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run +\ run-shell save-buffer saveb select-layout select-pane select-window +\ selectl selectp selectw send send-keys send-prefix set set-buffer +\ set-environment set-hook set-option set-window-option setb setenv setw +\ show show-buffer show-environment show-hooks show-messages show-options +\ show-window-options showb showenv showmsgs showw source source-file +\ split-window splitw start start-server suspend-client suspendc swap-pane +\ swap-window swapp swapw switch-client switchc unbind unbind-key +\ unlink-window unlinkw wait wait-for let &cpo = s:original_cpo unlet! s:original_cpo s:bg s:i diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index f4b11ff5dd..efcb840284 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -3,7 +3,7 @@ " Maintainer: Daniel Kho <daniel.kho@tauhop.com> " Previous Maintainer: Czo <Olivier.Sirol@lip6.fr> " Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> -" Last Changed: 2016 Mar 05 by Daniel Kho +" Last Changed: 2018 May 06 by Daniel Kho " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -43,6 +43,8 @@ syn keyword vhdlStatement sequence strong syn keyword vhdlStatement then to transport type syn keyword vhdlStatement unaffected units until use syn keyword vhdlStatement variable +" VHDL-2017 interface +syn keyword vhdlStatement view syn keyword vhdlStatement vmode vprop vunit syn keyword vhdlStatement wait when while with syn keyword vhdlStatement note warning error failure @@ -69,9 +71,7 @@ syn match vhdlType "\<time_vector\>\'\=" syn match vhdlType "\<character\>\'\=" syn match vhdlType "\<string\>\'\=" -"syn keyword vhdlType severity_level -syn keyword vhdlType line -syn keyword vhdlType text +syn keyword vhdlType line text side width " Predefined standard IEEE VHDL types syn match vhdlType "\<std_ulogic\>\'\=" @@ -124,6 +124,8 @@ syn match vhdlAttribute "\'succ" syn match vhdlAttribute "\'val" syn match vhdlAttribute "\'image" syn match vhdlAttribute "\'value" +" VHDL-2017 interface attribute +syn match vhdlAttribute "\'converse" syn keyword vhdlBoolean true false @@ -165,6 +167,9 @@ syn match vhdlOperator "=\|\/=\|>\|<\|>=" syn match vhdlOperator "<=\|:=" syn match vhdlOperator "=>" +" VHDL-2017 concurrent signal association (spaceship) operator +syn match vhdlOperator "<=>" + " VHDL-2008 conversion, matching equality/non-equality operators syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>=" @@ -183,8 +188,11 @@ syn match vhdlError "\(<\)[&+\-\/\\]\+" syn match vhdlError "[>=&+\-\/\\]\+\(<\)" " Covers most operators " support negative sign after operators. E.g. q<=-b; -syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+" -syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)" +" Supports VHDL-2017 spaceship (concurrent simple signal association). +syn match vhdlError "\(<=\)[<=&+\*\\?:]\+" +syn match vhdlError "[>=&+\-\*\\:]\+\(=>\)" +syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|:=\|=>\)[<>=&+\*\\?:]\+" +syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\)" syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+" syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 1551a314a3..5dc4f333e4 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -63,45 +63,45 @@ syn case match " Set up folding commands if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]' - if g:vimsyn_folding =~# 'a' - com! -nargs=* VimFolda <args> fold - else - com! -nargs=* VimFolda <args> + if g:vimsyn_folding =~# 'a' + com! -nargs=* VimFolda <args> fold + else + com! -nargs=* VimFolda <args> endif - if g:vimsyn_folding =~# 'f' - com! -nargs=* VimFoldf <args> fold - else - com! -nargs=* VimFoldf <args> + if g:vimsyn_folding =~# 'f' + com! -nargs=* VimFoldf <args> fold + else + com! -nargs=* VimFoldf <args> endif - if g:vimsyn_folding =~# 'l' - com! -nargs=* VimFoldl <args> fold - else - com! -nargs=* VimFoldl <args> + if g:vimsyn_folding =~# 'l' + com! -nargs=* VimFoldl <args> fold + else + com! -nargs=* VimFoldl <args> endif - if g:vimsyn_folding =~# 'm' - com! -nargs=* VimFoldm <args> fold - else - com! -nargs=* VimFoldm <args> + if g:vimsyn_folding =~# 'm' + com! -nargs=* VimFoldm <args> fold + else + com! -nargs=* VimFoldm <args> endif if g:vimsyn_folding =~# 'p' com! -nargs=* VimFoldp <args> fold else com! -nargs=* VimFoldp <args> endif - if g:vimsyn_folding =~# 'P' - com! -nargs=* VimFoldP <args> fold - else - com! -nargs=* VimFoldP <args> + if g:vimsyn_folding =~# 'P' + com! -nargs=* VimFoldP <args> fold + else + com! -nargs=* VimFoldP <args> endif - if g:vimsyn_folding =~# 'r' - com! -nargs=* VimFoldr <args> fold - else - com! -nargs=* VimFoldr <args> + if g:vimsyn_folding =~# 'r' + com! -nargs=* VimFoldr <args> fold + else + com! -nargs=* VimFoldr <args> endif - if g:vimsyn_folding =~# 't' - com! -nargs=* VimFoldt <args> fold - else - com! -nargs=* VimFoldt <args> + if g:vimsyn_folding =~# 't' + com! -nargs=* VimFoldt <args> fold + else + com! -nargs=* VimFoldt <args> endif else com! -nargs=* VimFolda <args> @@ -137,24 +137,26 @@ endif " Numbers {{{2 " ======= -syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand -syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand -syn match vimNumber "\<0[xX]\x\+" -syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}" +syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment " All vimCommands are contained by vimIsCommands. {{{2 -syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd +syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimIsCommand "\<\h\w*\>" contains=vimCommand -syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" +syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" +syn match vimVar "\s\zs&\a\+\>" syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn keyword vimCommand contained in " Insertions And Appends: insert append {{{2 " ======================= -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=starti\%[nsert]$" matchgroup=vimCommand end="^\.$"" " Behave! {{{2 " ======= @@ -175,7 +177,7 @@ syn keyword vimFTOption contained detect indent off on plugin " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. -syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList else @@ -190,8 +192,9 @@ syn keyword vimAugroupKey contained aug[roup] " Operators: {{{2 " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue -syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile -syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\(\<is\>\|\<isnot\>\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") @@ -201,7 +204,7 @@ endif " Functions : Tag is provided for those who wish to highlight tagged functions {{{2 " ========= syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID -syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand +syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' @@ -274,7 +277,7 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\ syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline syn match vimNotPatSep contained "\\\\" syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell -syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup +syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup @@ -292,11 +295,12 @@ syn match vimSubst "\%(^\|[^\\]\)\<s\%[ubstitute]\>[:#[:alpha:]]\@!" nextgroup=v syn match vimSubst "/\zs\<s\%[ubstitute]\>\ze/" nextgroup=vimSubstPat syn match vimSubst "\(:\+\s*\|^\s*\)s\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat syn match vimSubst1 contained "\<s\%[ubstitute]\>" nextgroup=vimSubstPat +syn match vimSubst2 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass syn match vimCollClassErr contained "\[:.\{-\}:\]" -syn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" +syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" syn match vimSubstSubstr contained "\\z\=\d" syn match vimSubstTwoBS contained "\\\\" syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags @@ -311,7 +315,7 @@ syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst -syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper +syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst2 syn match vimPlainMark contained "'[a-zA-Z0-9]" syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' @@ -331,9 +335,9 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod -syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline -syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar +syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod +syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline +syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" @@ -371,7 +375,7 @@ syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ syn keyword nvimUnmap tunm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs -syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs +syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue syn case ignore @@ -393,27 +397,27 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList " Angle-Bracket Notation (tnx to Michael Geddes) {{{2 " ====================== syn case ignore -syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket -syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket -syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket +syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket +syn match vimNotation '\%#=1\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket syn match vimBracket contained "[\\<>]" syn case match " User Function Highlighting {{{2 " (following Gautam Iyer's suggestion) " ========================== -syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute -syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation +syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute +syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" " Errors And Warnings: {{{2 " ==================== if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank -" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank +" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimElseIfErr "\<else\s\+if\>" syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ endif @@ -470,14 +474,14 @@ syn cluster vimFuncBodyList add=vimSynType syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup -syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" +syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" syn cluster vimFuncBodyList add=vimSynType " Syntax: match {{{2 syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup -syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" +syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" if has("conceal") syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar syn match vimSynMtchCchar contained "\S" @@ -492,12 +496,12 @@ syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vim syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup -syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" +syn match vimSynRegOpt contained "\%#=1\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup,vimOnlyHLGroup,nvimHLGroup syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg -syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" -syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod +syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" +syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod syn match vimSynPatMod contained "lc=\d\+" syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" @@ -530,14 +534,14 @@ syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotatio " ============ syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") - syn match vimHiCtermError contained "[^0-9]\i*" + syn match vimHiCtermError contained "\D\i*" endif syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster syn match vimHiGroup contained "\i\+" syn case ignore -syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl +syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib @@ -571,7 +575,9 @@ syn match vimHiNmbr contained '\d\+' syn keyword vimHiClear contained clear nextgroup=vimHiGroup " Highlight: link {{{2 -syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation,vimOnlyHLGroup,nvimHLGroup +" see tst24 (hi def vs hi) (Jul 06, 2018) +"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation +syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster syn cluster vimFuncBodyList add=vimHiLink " Control Characters {{{2 @@ -622,6 +628,7 @@ if !filereadable(s:luapath) endif if g:vimsyn_embed =~# 'l' && filereadable(s:luapath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimLuaRegion exe "syn include @vimLuaScript ".s:luapath VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript @@ -644,11 +651,12 @@ if !filereadable(s:perlpath) endif if g:vimsyn_embed =~# 'p' && filereadable(s:perlpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimPerlRegion let s:foldmethod = &l:foldmethod exe "syn include @vimPerlScript ".s:perlpath let &l:foldmethod = s:foldmethod - VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript - VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript + VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)\ze\(\s*["#].*\)\=$+ end=+^\z1\ze\(\s*[#"].*\)\=$+ contains=@vimPerlScript + VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript syn cluster vimFuncBodyList add=vimPerlRegion else syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -667,12 +675,13 @@ if !filereadable(s:rubypath) endfor endif if g:vimsyn_embed =~# 'r' && filereadable(s:rubypath) + syn cluster vimFuncBodyList add=vimRubyRegion unlet! b:current_syntax let s:foldmethod = &l:foldmethod exe "syn include @vimRubyScript ".s:rubypath let &l:foldmethod = s:foldmethod - VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript - syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript + VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimRubyScript + syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript syn cluster vimFuncBodyList add=vimRubyRegion else syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -692,11 +701,12 @@ if !filereadable(s:pythonpath) endif if g:vimsyn_embed =~# 'P' && filereadable(s:pythonpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimPythonRegion exe "syn include @vimPythonScript ".s:pythonpath - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript syn cluster vimFuncBodyList add=vimPythonRegion else syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -723,6 +733,7 @@ if s:trytcl endif if g:vimsyn_embed =~# 't' && filereadable(s:tclpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimTclRegion exe "syn include @vimTclScript ".s:tclpath VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript @@ -751,6 +762,7 @@ endif if g:vimsyn_embed =~# 'm' && filereadable(s:mzschemepath) unlet! b:current_syntax let s:iskKeep= &isk + syn cluster vimFuncBodyList add=vimMzSchemeRegion exe "syn include @vimMzSchemeScript ".s:mzschemepath let &isk= s:iskKeep unlet s:iskKeep @@ -875,7 +887,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimOper Operator hi def link vimOption PreProc hi def link vimParenSep Delimiter - hi def link vimPatSepErr vimPatSep + hi def link vimPatSepErr vimError hi def link vimPatSepR vimPatSep hi def link vimPatSep SpecialChar hi def link vimPatSepZone vimString @@ -897,6 +909,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimStatement Statement hi def link vimStringCont vimString hi def link vimString String + hi def link vimStringEnd vimString hi def link vimSubst1 vimSubst hi def link vimSubstDelim Delimiter hi def link vimSubstFlags Special diff --git a/runtime/syntax/wast.vim b/runtime/syntax/wast.vim new file mode 100644 index 0000000000..245d5f6f19 --- /dev/null +++ b/runtime/syntax/wast.vim @@ -0,0 +1,84 @@ +" Vim syntax file +" Language: WebAssembly +" Maintainer: rhysd <lin90162@yahoo.co.jp> +" Last Change: Jul 29, 2018 +" For bugs, patches and license go to https://github.com/rhysd/vim-wasm + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType + +" Instructions +" https://webassembly.github.io/spec/core/text/instructions.html +" Note: memarg (align=,offset=) can be added to memory instructions +syn match wastInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display +syn match wastInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions +syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions +syn match wastParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display + +" Identifiers +" https://webassembly.github.io/spec/core/text/values.html#text-id +syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained display +syn match wastUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display + +" String literals +" https://webassembly.github.io/spec/core/text/values.html#strings +syn region wastString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=wastStringSpecial +syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString + +" Float literals +" https://webassembly.github.io/spec/core/text/values.html#floating-point +syn match wastFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn match wastFloat "\<-\=0x\x\%(_\=\d\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn keyword wastFloat inf nan contained + +" Integer literals +" https://webassembly.github.io/spec/core/text/values.html#integers +syn match wastNumber "\<-\=\d\%(_\=\d\)*\>" display contained +syn match wastNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained + +" Comments +" https://webassembly.github.io/spec/core/text/lexical.html#comments +syn region wastComment start=";;" end="$" display +syn region wastComment start="(;;\@!" end=";)" + +syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastCluster + +" Types +" https://webassembly.github.io/spec/core/text/types.html +syn keyword wastType i64 i32 f64 f32 param result anyfunc mut contained +syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained + +" Modules +" https://webassembly.github.io/spec/core/text/modules.html +syn keyword wastModule module type export import table memory global data elem contained +syn match wastModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained + +syn sync lines=100 + +hi def link wastModule PreProc +hi def link wastListDelimiter Delimiter +hi def link wastInstWithType Operator +hi def link wastInstGeneral Operator +hi def link wastControlInst Statement +hi def link wastParamInst Conditional +hi def link wastString String +hi def link wastStringSpecial Special +hi def link wastNamedVar Identifier +hi def link wastUnnamedVar PreProc +hi def link wastFloat Float +hi def link wastNumber Number +hi def link wastComment Comment +hi def link wastType Type + +let b:current_syntax = "wast" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim index b4efcdcbdf..3eba438aa7 100644 --- a/runtime/syntax/zsh.vim +++ b/runtime/syntax/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-11-22 +" Latest Revision: 2018-05-12 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -67,15 +67,15 @@ syn match zshRedir '|&\=' syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\z([^<]\S*\)' \ end='^\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\\\z(\S\+\)' \ end='^\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<-\s*\\\=\z(\S\+\)' \ end='^\s*\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+ \ end='^\z1\>' @@ -118,8 +118,8 @@ syn keyword zshCommands alias autoload bg bindkey break bye cap cd \ ttyctl type ulimit umask unalias unfunction \ unhash unlimit unset vared wait \ whence where which zcompile zformat zftp zle - \ zmodload zparseopts zprof zpty zregexparse - \ zsocket zstyle ztcp + \ zmodload zparseopts zprof zpty zrecompile + \ zregexparse zsocket zstyle ztcp " Options, generated by: echo ${(j:\n:)options[(I)*]} | sort " Create a list of option names from zsh source dir: |