diff options
Diffstat (limited to 'runtime/syntax/latte.vim')
-rw-r--r-- | runtime/syntax/latte.vim | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/runtime/syntax/latte.vim b/runtime/syntax/latte.vim index e2a8729f3..f95c7b5c7 100644 --- a/runtime/syntax/latte.vim +++ b/runtime/syntax/latte.vim @@ -7,11 +7,8 @@ " I based this on the TeX and Scheme syntax files (but mostly scheme). " See http://www.latte.org for info on the language. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,11 +17,7 @@ syn match latteOther "\\{" syn match latteOther "\\}" syn match latteOther "\\\\" -if version < 600 - set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -else - setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -endif +setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther @@ -70,29 +63,21 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_latte_syntax_inits") - if version < 508 - let did_latte_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink latteSyntax Statement - HiLink latteVar Function +HiLink latteSyntax Statement +HiLink latteVar Function - HiLink latteString String - HiLink latteQuote String +HiLink latteString String +HiLink latteQuote String - HiLink latteDelimiter Delimiter - HiLink latteOperator Operator +HiLink latteDelimiter Delimiter +HiLink latteOperator Operator - HiLink latteComment Comment - HiLink latteError Error +HiLink latteComment Comment +HiLink latteError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "latte" |