mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #3966 from asbjornenge/updated_tmlang
Update TextMate & Sublime Text Syntaxt Highlighting with ONBUILD
This commit is contained in:
commit
84285f7539
4 changed files with 79 additions and 32 deletions
|
@ -1,23 +0,0 @@
|
||||||
# [PackageDev] target_format: plist, ext: tmLanguage
|
|
||||||
---
|
|
||||||
name: Dockerfile
|
|
||||||
scopeName: source.dockerfile
|
|
||||||
uuid: a39d8795-59d2-49af-aa00-fe74ee29576e
|
|
||||||
|
|
||||||
patterns:
|
|
||||||
# Keywords
|
|
||||||
- name: keyword.control.dockerfile
|
|
||||||
match: ^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s
|
|
||||||
- name: keyword.operator.dockerfile
|
|
||||||
match: ^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s
|
|
||||||
# String
|
|
||||||
- name: string.quoted.double.dockerfile
|
|
||||||
begin: "\""
|
|
||||||
end: "\""
|
|
||||||
patterns:
|
|
||||||
- name: constant.character.escaped.dockerfile
|
|
||||||
match: \\.
|
|
||||||
# Comment
|
|
||||||
- name: comment.block.dockerfile
|
|
||||||
match: ^\s*#.*$
|
|
||||||
...
|
|
|
@ -12,15 +12,37 @@
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>match</key>
|
<key>match</key>
|
||||||
<string>^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s</string>
|
<string>^\s*(ONBUILD\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR)\s</string>
|
||||||
<key>name</key>
|
<key>captures</key>
|
||||||
<string>keyword.control.dockerfile</string>
|
<dict>
|
||||||
|
<key>0</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>keyword.control.dockerfile</string>
|
||||||
|
</dict>
|
||||||
|
<key>1</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>keyword.other.special-method.dockerfile</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>match</key>
|
<key>match</key>
|
||||||
<string>^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s</string>
|
<string>^\s*(ONBUILD\s+)?(CMD|ENTRYPOINT)\s</string>
|
||||||
<key>name</key>
|
<key>captures</key>
|
||||||
<string>keyword.operator.dockerfile</string>
|
<dict>
|
||||||
|
<key>0</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>keyword.operator.dockerfile</string>
|
||||||
|
</dict>
|
||||||
|
<key>1</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>keyword.other.special-method.dockerfile</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>begin</key>
|
<key>begin</key>
|
||||||
|
@ -39,6 +61,23 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>begin</key>
|
||||||
|
<string>'</string>
|
||||||
|
<key>end</key>
|
||||||
|
<string>'</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>string.quoted.single.dockerfile</string>
|
||||||
|
<key>patterns</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>match</key>
|
||||||
|
<string>\\.</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>constant.character.escaped.dockerfile</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>match</key>
|
<key>match</key>
|
||||||
<string>^\s*#.*$</string>
|
<string>^\s*#.*$</string>
|
||||||
|
|
24
contrib/syntax/textmate/Dockerfile.tmPreferences
Normal file
24
contrib/syntax/textmate/Dockerfile.tmPreferences
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Comments</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.dockerfile</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>shellVariables</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>TM_COMMENT_START</string>
|
||||||
|
<key>value</key>
|
||||||
|
<string># </string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>2B215AC0-A7F3-4090-9FF6-F4842BD56CA7</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -1,9 +1,16 @@
|
||||||
# Dockerfile.tmLanguage
|
# Dockerfile.tmLanguage
|
||||||
|
|
||||||
Pretty basic Dockerfile.tmLanguage for Sublime Text syntax highlighting.
|
Dockerfile syntaxt highlighting for TextMate and Sublime Text.
|
||||||
|
|
||||||
PR's with syntax updates, suggestions etc. are all very much appreciated!
|
## Install
|
||||||
|
|
||||||
I'll get to making this installable via Package Control soon!
|
### Sublime Text
|
||||||
|
|
||||||
|
Available for Sublime Text under [package control](https://sublime.wbond.net/packages/Dockerfile%20Syntax%20Highlighting).
|
||||||
|
Search for *Dockerfile Syntax Highlighting*
|
||||||
|
|
||||||
|
### TextMate
|
||||||
|
|
||||||
|
*...unknown. Probably put it somewhere smart.*
|
||||||
|
|
||||||
enjoy.
|
enjoy.
|
||||||
|
|
Loading…
Reference in a new issue