From abb61cd01a7be067e47e4995793982a3fe6f29e8 Mon Sep 17 00:00:00 2001 From: Jari Maijenburg Date: Sun, 29 Nov 2020 16:31:09 +0100 Subject: [PATCH] runtime/dockerfile.vim: ebdf3c964a901fc00c9009689f7cfda478342c51 Port only dockerfile.vim from upstream https://github.com/vim/vim/commit/ebdf3c964a901fc00c9009689f7cfda478342c51 --- runtime/syntax/dockerfile.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/syntax/dockerfile.vim b/runtime/syntax/dockerfile.vim index da3a3fc9d2..ce52e697cd 100644 --- a/runtime/syntax/dockerfile.vim +++ b/runtime/syntax/dockerfile.vim @@ -1,6 +1,6 @@ " dockerfile.vim - Syntax highlighting for Dockerfiles " Maintainer: Honza Pokorny -" Last Change: 2020 Jan 27 +" Last Change: 2020 Feb 11 " License: BSD " https://docs.docker.com/engine/reference/builder/ @@ -22,12 +22,12 @@ syntax region dockerfileFrom matchgroup=dockerfileKeyword start=/\v^\s*(FROM)\ze syntax keyword dockerfileKeyword contained ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE HEALTHCHECK LABEL MAINTAINER ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR syntax match dockerfileOption contained /\v(^|\s)\zs--\S+/ -syntax match dockerfileInstruction contained /\v(\S+)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileValue -syntax match dockerfileInstruction contained /\v(ADD|COPY)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileJSON -syntax match dockerfileInstruction contained /\v(HEALTHCHECK)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileInstruction -syntax match dockerfileInstruction contained /\v(CMD|ENTRYPOINT|RUN)/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileShell -syntax match dockerfileInstruction contained /\v(CMD|ENTRYPOINT|RUN)\ze\s+\[/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON -syntax match dockerfileInstruction contained /\v(SHELL|VOLUME)/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON +syntax match dockerfileInstruction contained /\v<(\S+)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileValue +syntax match dockerfileInstruction contained /\v<(ADD|COPY)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileJSON +syntax match dockerfileInstruction contained /\v<(HEALTHCHECK)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileInstruction +syntax match dockerfileInstruction contained /\v<(CMD|ENTRYPOINT|RUN)>/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileShell +syntax match dockerfileInstruction contained /\v<(CMD|ENTRYPOINT|RUN)>\ze\s+\[/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON +syntax match dockerfileInstruction contained /\v<(SHELL|VOLUME)>/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON syntax region dockerfileString contained start=/\v"/ skip=/\v\\./ end=/\v"/ syntax region dockerfileJSON contained keepend start=/\v\[/ skip=/\v\\\_./ end=/\v$/ contains=@JSON