From 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 11 Nov 2014 02:37:21 +0100 Subject: Update --- syntax/blade.vim | 52 ++++++++++++++++------------ syntax/coffee.vim | 2 +- syntax/css.vim | 96 ++++++++++++++++++++++++++++----------------------- syntax/dockerfile.vim | 13 +++++-- syntax/elixir.vim | 39 +++++++++++---------- syntax/go.vim | 54 ++++++++++++++--------------- syntax/html.vim | 2 +- syntax/mustache.vim | 2 +- syntax/opencl.vim | 56 +++++++++++++++--------------- syntax/php.vim | 20 +++++++++-- syntax/rust.vim | 20 +++++------ syntax/systemd.vim | 4 +++ syntax/toml.vim | 23 +++++++++--- syntax/typescript.vim | 6 ++-- syntax/vimgo.vim | 11 ++++++ 15 files changed, 235 insertions(+), 165 deletions(-) create mode 100644 syntax/vimgo.vim (limited to 'syntax') diff --git a/syntax/blade.vim b/syntax/blade.vim index a02b88ae..3f512163 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -1,35 +1,41 @@ -" Language: Blade (Laravel) -" Maintainer: xsbeats -" URL: http://github.com/xsbeats/vim-blade -" License: WTFPL +" Language: Blade +" Maintainer: Jason Walton +" URL: https://github.com/xsbeats/vim-blade +" License: DBAD -if exists("b:current_syntax") +" Check if our syntax is already loaded +if exists('b:current_syntax') && b:current_syntax == 'blade' finish endif -runtime! syntax/html.vim -unlet b:current_syntax - +" Include PHP runtime! syntax/php.vim -unlet b:current_syntax - -syn match bladeConditional /@\(choice\|each\|elseif\|extends\|for\|foreach\|if\|include\|lang\|section\|unless\|while\|yield\)\>\s*/ nextgroup=bladeParenBlock containedin=ALLBUT,bladeComment +silent! unlet b:current_syntax -syn match bladeKeyword /@\(else\|endfor\|endforeach\|endif\|endsection\|endunless\|endwhile\|overwrite\|parent\|show\|stop\)\>/ containedin=ALL,bladeComment +" Echos +syn region bladeUnescapedEcho matchgroup=bladeEchoDelim start=/@\@/ +syn match bladeStructure /\s*@\(append\|choice\|each\|elseif\|extends\|for\|foreach\|forelse\|if\|include\|lang\|push\|section\|stack\|unless\|while\|yield\|\)\>\s*/ nextgroup=bladeParens +syn region bladeParens matchgroup=bladeParen start=/(/ end=/)/ contained contains=@bladeAll,@phpClTop -syn region bladeEchoUnescaped matchgroup=bladeEchoDelim start="\([@|{]\)\@ +" Maintainer: Mick Koch " URL: http://github.com/kchmck/vim-coffee-script " License: WTFPL diff --git a/syntax/css.vim b/syntax/css.vim index 1bfb39f0..608dacb2 100644 --- a/syntax/css.vim +++ b/syntax/css.vim @@ -6,7 +6,7 @@ " Nikolai Weibull (Add CSS2 support) " Maintainer: Jules Wang " URL: https://github.com/JulesWang/css.vim -" Last Change: 2013 Nov.27 +" Last Change: 2014 Oct.28 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -26,18 +26,19 @@ set cpo&vim syn case ignore -" All HTML4 tags -syn keyword cssTagName abbr acronym address applet area a b base -syn keyword cssTagName basefont bdo big blockquote body br button -syn keyword cssTagName caption center cite code col colgroup dd del -syn keyword cssTagName dfn dir div dl dt em fieldset font form frame -syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i -syn keyword cssTagName iframe img input ins isindex kbd label legend li -syn keyword cssTagName link map menu meta noframes noscript ol optgroup -syn keyword cssTagName option p param pre q s samp script select small -syn keyword cssTagName span strike strong style sub sup table tbody td -syn keyword cssTagName textarea tfoot th thead title tr tt ul u var +" HTML4 tags +syn keyword cssTagName abbr address area a b base +syn keyword cssTagName bdo blockquote body br button +syn keyword cssTagName caption cite code col colgroup dd del +syn keyword cssTagName dfn div dl dt em fieldset form +syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i +syn keyword cssTagName iframe input ins isindex kbd label legend li +syn keyword cssTagName link map menu meta noscript ol optgroup +syn keyword cssTagName option p param pre q s samp script small +syn keyword cssTagName span strong sub sup tbody td +syn keyword cssTagName textarea tfoot th thead title tr ul u var syn keyword cssTagName object svg +syn match cssTagName /\\|\\|\/ " 34 HTML5 tags syn keyword cssTagName article aside audio bdi canvas command data @@ -47,8 +48,8 @@ syn keyword cssTagName output progress rt rp ruby section syn keyword cssTagName source summary time track video wbr " Tags not supported in HTML5 -syn keyword cssDeprecated acronym applet basefont big center dir -syn keyword cssDeprecated font frame frameset noframes strike tt +" acronym applet basefont big center dir +" font frame frameset noframes strike tt syn match cssTagName "\*" @@ -70,10 +71,10 @@ 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 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 cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" 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 @@ -116,15 +117,27 @@ syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssSt " @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,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr,cssNoise -"syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>" -"syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline +syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise + +syn match cssFontDescriptorProp contained "\" syn keyword cssFontDescriptorProp contained src +syn match cssFontDescriptorProp contained "\" syn match cssFontDescriptorProp contained "\" -syn keyword cssFontDescriptorAttr contained all +syn match cssFontDescriptorProp contained "\" + +" src functions syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend -syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+" -syn match cssUnicodeRange contained "U+\x\+-\x\+" +" 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 @@ -133,23 +146,23 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na syn keyword cssColor contained aliceblue antiquewhite aquamarine azure syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan -syn match cssColor contained /dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)/ -syn match cssColor contained /dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)/ -syn match cssColor contained /darkslate\(blue\|gray\|grey\)/ -syn match cssColor contained /dark\(turquoise\|violet\)/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen syn keyword cssColor contained lemonchiffon limegreen linen magenta -syn match cssColor contained /light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)/ -syn match cssColor contained /light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)/ -syn match cssColor contained /light\(slategray\|slategrey\|steelblue\)/ -syn match cssColor contained /medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)/ -syn match cssColor contained /medium\(slateblue\|springgreen\|turquoise\|violetred\)/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite syn keyword cssColor contained oldlace olivedrab orange orangered orchid -syn match cssColor contained /pale\(goldenrod\|green\|turquoise\|violetred\)/ +syn match cssColor contained /\/ 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 @@ -265,6 +278,7 @@ syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>" " CSS Fonts Module Level 3 " http://www.w3.org/TR/css-fonts-3/ syn match cssFontProp contained "\" + " font attributes syn keyword cssFontAttr contained icon menu caption syn match cssFontAttr contained "\" @@ -272,27 +286,21 @@ syn match cssFontAttr contained "\" syn match cssFontAttr contained "\" syn keyword cssFontAttr contained larger smaller syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" - " 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 Unicode Verdana Webdings Wingdings York Zapf +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 syn keyword cssFontAttr contained cursive fantasy monospace - " font-feature-settings attributes syn keyword cssFontAttr contained on off - " font-stretch attributes syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" - " font-style attributes syn keyword cssFontAttr contained italic oblique - -" font-variant-caps attributes -syn match cssFontAttr contained "\<\(all-\)\=\(small-\|petite-\|titling-\)caps\>" -syn keyword cssFontAttr contained unicase - +" font-synthesis attributes +syn keyword cssFontAttr contained weight style " font-weight attributes syn keyword cssFontAttr contained bold bolder lighter +" TODO: font-variant-* attributes "------------------------------------------------ " Webkit specific property/attributes diff --git a/syntax/dockerfile.vim b/syntax/dockerfile.vim index 90e0651b..c3a9c4e0 100644 --- a/syntax/dockerfile.vim +++ b/syntax/dockerfile.vim @@ -7,8 +7,6 @@ if exists("b:current_syntax") finish endif -let b:current_syntax = "dockerfile" - syntax case ignore syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/ @@ -20,3 +18,14 @@ highlight link dockerfileString String syntax match dockerfileComment "\v^\s*#.*$" highlight link dockerfileComment Comment + +syntax include @DockerSh syntax/sh.vim +try + syntax include @DockerSh after/syntax/sh.vim +catch +endtry + +syntax region dockerShSnip matchgroup=DockerShGroup start="^\s*\%(RUN\|CMD\)\s\+" end="$" contains=@DockerSh +highlight link DockerShGroup dockerfileKeyword + +let b:current_syntax = "dockerfile" diff --git a/syntax/elixir.vim b/syntax/elixir.vim index a0c8f289..f7035633 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -63,14 +63,14 @@ syn match elixirRegexQuantifier "[*?+][?+]\=" contained display syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display -syn region elixirRegex matchgroup=elixirDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial +syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass -syn region elixirString matchgroup=elixirDelimiter start="'" end="'" skip="\\'" -syn region elixirString matchgroup=elixirDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained -syn region elixirInterpolation matchgroup=elixirDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop +syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'" +syn region elixirString matchgroup=elixirStringDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained +syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop @@ -83,25 +83,25 @@ syn match elixirString "\(\w\)\@\| syn region elixirBlock matchgroup=elixirKeyword start="\\(:\)\@!" end="\" contains=ALLBUT,@elixirNotTop fold syn region elixirAnonymousFunction matchgroup=elixirKeyword start="\" end="\" contains=ALLBUT,@elixirNotTop fold -syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirDelimiter +syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE -syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region elixirSigil matchgroup=elixirDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation -syn region elixirSigil matchgroup=elixirDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation -syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation -syn region elixirSigil matchgroup=elixirDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation " Sigils surrounded with docString -syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold -syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold " Defines syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl @@ -172,4 +172,7 @@ hi def link elixirRegexQuantifier elixirSpecial hi def link elixirSpecial Special hi def link elixirString String hi def link elixirSigil String -hi def link elixirDelimiter Delimiter +hi def link elixirStringDelimiter Delimiter +hi def link elixirRegexDelimiter Delimiter +hi def link elixirInterpolationDelimiter Delimiter +hi def link elixirSigilDelimiter Delimiter diff --git a/syntax/go.vim b/syntax/go.vim index 5aabac70..59f72ed7 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -29,40 +29,40 @@ if exists("b:current_syntax") finish endif -if !exists("go_highlight_array_whitespace_error") - let go_highlight_array_whitespace_error = 1 +if !exists("g:go_highlight_array_whitespace_error") + let g:go_highlight_array_whitespace_error = 1 endif -if !exists("go_highlight_chan_whitespace_error") - let go_highlight_chan_whitespace_error = 1 +if !exists("g:go_highlight_chan_whitespace_error") + let g:go_highlight_chan_whitespace_error = 1 endif -if !exists("go_highlight_extra_types") - let go_highlight_extra_types = 1 +if !exists("g:go_highlight_extra_types") + let g:go_highlight_extra_types = 1 endif -if !exists("go_highlight_space_tab_error") - let go_highlight_space_tab_error = 1 +if !exists("g:go_highlight_space_tab_error") + let g:go_highlight_space_tab_error = 1 endif -if !exists("go_highlight_trailing_whitespace_error") - let go_highlight_trailing_whitespace_error = 1 +if !exists("g:go_highlight_trailing_whitespace_error") + let g:go_highlight_trailing_whitespace_error = 1 endif -if !exists("go_highlight_operators") - let go_highlight_operators = 0 +if !exists("g:go_highlight_operators") + let g:go_highlight_operators = 1 endif -if !exists("go_highlight_functions") - let go_highlight_functions = 0 +if !exists("g:go_highlight_functions") + let g:go_highlight_functions = 0 endif -if !exists("go_highlight_methods") - let go_highlight_methods = 0 +if !exists("g:go_highlight_methods") + let g:go_highlight_methods = 0 endif -if !exists("go_highlight_structs") - let go_highlight_structs = 0 +if !exists("g:go_highlight_structs") + let g:go_highlight_structs = 0 endif syn case match @@ -182,12 +182,12 @@ syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>" hi def link goImaginary Number " Spaces after "[]" -if go_highlight_array_whitespace_error != 0 +if g:go_highlight_array_whitespace_error != 0 syn match goSpaceError display "\(\[\]\)\@<=\s\+" endif " Spacing errors around the 'chan' keyword -if go_highlight_chan_whitespace_error != 0 +if g:go_highlight_chan_whitespace_error != 0 " receive-only annotation on chan type syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@=" " send-only annotation on chan type @@ -197,7 +197,7 @@ if go_highlight_chan_whitespace_error != 0 endif " Extra types commonly seen -if go_highlight_extra_types != 0 +if g:go_highlight_extra_types != 0 syn match goExtraType /\/ syn match goExtraType /\/ syn match goExtraType /\/ @@ -205,12 +205,12 @@ if go_highlight_extra_types != 0 endif " Space-tab error -if go_highlight_space_tab_error != 0 +if g:go_highlight_space_tab_error != 0 syn match goSpaceError display " \+\t"me=e-1 endif " Trailing white space error -if go_highlight_trailing_whitespace_error != 0 +if g:go_highlight_trailing_whitespace_error != 0 syn match goSpaceError display excludenl "\s\+$" endif @@ -227,7 +227,7 @@ hi def link goTodo Todo " Operators; -if go_highlight_operators != 0 +if g:go_highlight_operators != 0 syn match goOperator /:=/ syn match goOperator />=/ syn match goOperator /<=/ @@ -246,20 +246,20 @@ endif hi def link goOperator Operator " Functions; -if go_highlight_functions != 0 +if g:go_highlight_functions != 0 syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/ syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/ endif hi def link goFunction Function " Methods; -if go_highlight_methods != 0 +if g:go_highlight_methods != 0 syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/ endif hi def link goMethod Type " Structs; -if go_highlight_structs != 0 +if g:go_highlight_structs != 0 syn match goStruct /\(.\)\@<=\w\+\({\)\@=/ syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/ endif diff --git a/syntax/html.vim b/syntax/html.vim index eedd6582..78da84f0 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -68,7 +68,7 @@ syn keyword htmlArg contained autoplay preload controls loop poster media kind c "
, ,