# HG changeset patch # User Maxim Dounin # Date 1514220060 -10800 # Node ID e2685c46749673473e6066974033735faa82528e # Parent d91a8c4ac6bb10bb30c598a4f2c993fc34bf8cec Contrib: updated vim syntax rules for variables. Non-quoted parameters are allowed to contain variables in curly brackets (see d91a8c4ac6bb), so vim syntax rules were adjusted accordingly. diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim --- a/contrib/vim/syntax/nginx.vim +++ b/contrib/vim/syntax/nginx.vim @@ -15,7 +15,7 @@ endif syn match ngxName '\([^;{} \t\\]\|\\.\)\+' \ contains=@ngxDirectives \ nextgroup=@ngxParams skipwhite skipempty -syn match ngxParam '\([^;{ \t\\]\|\\.\)\+' +syn match ngxParam '\(\${\|[^;{ \t\\]\|\\.\)\+' \ contained \ contains=ngxVariable \ nextgroup=@ngxParams skipwhite skipempty @@ -29,7 +29,7 @@ syn region ngxBlock start=+{+ end=+}+ co \ contains=@ngxTopLevel syn match ngxComment '#.*$' -syn match ngxVariable '\$\w\+' contained +syn match ngxVariable '\$\(\w\+\|{\w\+}\)' contained syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained syn cluster ngxTopLevel @@ -52,7 +52,7 @@ syn cluster ngxParams add=ngxBoolean syn cluster ngxTopLevel add=ngxDirectiveListen syn keyword ngxDirectiveListen listen \ nextgroup=@ngxListenParams skipwhite skipempty -syn match ngxListenParam '\([^;{ \t\\]\|\\.\)\+' +syn match ngxListenParam '\(\${\|[^;{ \t\\]\|\\.\)\+' \ contained \ nextgroup=@ngxListenParams skipwhite skipempty syn region ngxListenString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+