6180
|
1 " dockerfile.vim - Syntax highlighting for Dockerfiles
|
|
2 " Maintainer: Honza Pokorny <http://honza.ca>
|
|
3 " Version: 0.5
|
|
4 " Last Change: 2014 Aug 29
|
|
5 " License: BSD
|
|
6
|
|
7
|
|
8 if exists("b:current_syntax")
|
|
9 finish
|
|
10 endif
|
|
11
|
|
12 let b:current_syntax = "dockerfile"
|
|
13
|
|
14 syntax case ignore
|
|
15
|
|
16 syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|VOLUME|WORKDIR|COPY)\s/
|
|
17
|
|
18 syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
|
19
|
|
20 syntax match dockerfileComment "\v^\s*#.*$"
|
|
21
|
|
22 hi def link dockerfileString String
|
|
23 hi def link dockerfileKeyword Keyword
|
|
24 hi def link dockerfileComment Comment
|