1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update Dockerfile highlight definitions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2016-06-05 17:45:21 +02:00
parent 0f13b69fe2
commit 4cb71f8082
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
4 changed files with 17 additions and 20 deletions

View file

@ -9,23 +9,25 @@
license="GPL"> license="GPL">
<highlighting> <highlighting>
<list name="keywords"> <list name="keywords">
<item> FROM </item>
<item> MAINTAINER </item>
<item> ENV </item>
<item> RUN </item>
<item> ONBUILD </item>
<item> COPY </item>
<item> ADD </item> <item> ADD </item>
<item> VOLUME </item> <item> ARG </item>
<item> EXPOSE </item>
<item> ENTRYPOINT </item>
<item> CMD </item> <item> CMD </item>
<item> WORKDIR </item> <item> COPY </item>
<item> USER </item> <item> ENTRYPOINT </item>
<item> ENV </item>
<item> EXPOSE </item>
<item> FROM </item>
<item> HEALTHCHECK </item>
<item> LABEL </item> <item> LABEL </item>
<item> MAINTAINER </item>
<item> ONBUILD </item>
<item> RUN </item>
<item> SHELL </item>
<item> STOPSIGNAL </item> <item> STOPSIGNAL </item>
<item> USER </item>
<item> VOLUME </item>
<item> WORKDIR </item>
</list> </list>
<contexts> <contexts>
<context name="normal" attribute="Normal" lineEndContext="#stay"> <context name="normal" attribute="Normal" lineEndContext="#stay">
<DetectSpaces/> <DetectSpaces/>
@ -35,23 +37,19 @@
<DetectChar attribute="String" context="string&quot;" char="&quot;"/> <DetectChar attribute="String" context="string&quot;" char="&quot;"/>
<DetectChar attribute="String" context="string'" char="'"/> <DetectChar attribute="String" context="string'" char="'"/>
</context> </context>
<context attribute="Comment" lineEndContext="#pop" name="Comment"> <context attribute="Comment" lineEndContext="#pop" name="Comment">
<LineContinue attribute="Comment" context="#stay" /> <LineContinue attribute="Comment" context="#stay" />
</context> </context>
<context name="string&quot;" attribute="String" lineEndContext="#pop"> <context name="string&quot;" attribute="String" lineEndContext="#pop">
<LineContinue attribute="Operator" context="#stay"/> <LineContinue attribute="Operator" context="#stay"/>
<DetectChar attribute="String" context="#pop" char="&quot;"/> <DetectChar attribute="String" context="#pop" char="&quot;"/>
<DetectChar attribute="Operator" context="dollar" char="$"/> <DetectChar attribute="Operator" context="dollar" char="$"/>
</context> </context>
<context name="string'" attribute="String" lineEndContext="#pop"> <context name="string'" attribute="String" lineEndContext="#pop">
<LineContinue attribute="String" context="#stay"/> <LineContinue attribute="String" context="#stay"/>
<DetectChar attribute="String" context="#pop" char="'"/> <DetectChar attribute="String" context="#pop" char="'"/>
<DetectChar attribute="Operator" context="dollar" char="$"/> <DetectChar attribute="Operator" context="dollar" char="$"/>
</context> </context>
</contexts> </contexts>
<itemDatas> <itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/> <itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/>
@ -67,4 +65,3 @@
</general> </general>
</language> </language>
<!-- kate: space-indent on; indent-width 2; replace-tabs on; --> <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->

View file

@ -2,7 +2,7 @@
syntax "Dockerfile" "Dockerfile[^/]*$" syntax "Dockerfile" "Dockerfile[^/]*$"
## Keywords ## Keywords
icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]" icolor red "^(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)[[:space:]]"
## Brackets & parenthesis ## Brackets & parenthesis
color brightgreen "(\(|\)|\[|\])" color brightgreen "(\(|\)|\[|\])"

View file

@ -25,7 +25,7 @@
</dict> </dict>
</dict> </dict>
<key>match</key> <key>match</key>
<string>^\s*(?:(ONBUILD)\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR|COPY|LABEL|STOPSIGNAL|ARG)\s</string> <string>^\s*(?:(ONBUILD)\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s</string>
</dict> </dict>
<dict> <dict>
<key>captures</key> <key>captures</key>

View file

@ -11,7 +11,7 @@ let b:current_syntax = "dockerfile"
syntax case ignore syntax case ignore
syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|LABEL|VOLUME|WORKDIR|COPY|STOPSIGNAL|ARG)\s/ syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s/
highlight link dockerfileKeyword Keyword highlight link dockerfileKeyword Keyword
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/ syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/