Mercurial > vim
view runtime/syntax/dockerfile.vim @ 34016:34f6f3678cae
runtime(r): Update R runtime files and docs (#13757)
Commit: https://github.com/vim/vim/commit/9042bd8b09bae0051fdf8eb5a57fa4b4420c92a0
Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
Date: Mon Dec 25 09:22:27 2023 +0000
runtime(r): Update R runtime files and docs (https://github.com/vim/vim/issues/13757)
* Update R runtime files
- Fix indentation issue with ggplot().
- Setlocal autoindent in indent/r.vim.
- New syntax option: rmd_include_latex.
- Clear syn iskeyword to recognize _ as keyword.
- Document some options.
- remove the test has("patch-7.4.1142")
- Update changed date of doc files
Signed-off-by: Jakson Alves de Aquino <jalvesaq@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 25 Dec 2023 10:30:07 +0100 |
parents | 7be3663e2f2b |
children | 0c191d9c6206 |
line wrap: on
line source
" dockerfile.vim - Syntax highlighting for Dockerfiles " Maintainer: Honza Pokorny <https://honza.ca> " Last Change: 2020 Feb 11 " License: BSD " https://docs.docker.com/engine/reference/builder/ if exists("b:current_syntax") finish endif syntax include @JSON syntax/json.vim unlet b:current_syntax syntax include @Shell syntax/sh.vim unlet b:current_syntax syntax case ignore syntax match dockerfileLinePrefix /\v^\s*(ONBUILD\s+)?\ze\S/ contains=dockerfileKeyword nextgroup=dockerfileInstruction skipwhite syntax region dockerfileFrom matchgroup=dockerfileKeyword start=/\v^\s*(FROM)\ze(\s|$)/ skip=/\v\\\_./ end=/\v((^|\s)AS(\s|$)|$)/ contains=dockerfileOption 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 region dockerfileString contained start=/\v"/ skip=/\v\\./ end=/\v"/ syntax region dockerfileJSON contained keepend start=/\v\[/ skip=/\v\\\_./ end=/\v$/ contains=@JSON syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=@Shell syntax region dockerfileValue contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=dockerfileString syntax region dockerfileComment start=/\v^\s*#/ end=/\v$/ set commentstring=#\ %s hi def link dockerfileString String hi def link dockerfileKeyword Keyword hi def link dockerfileComment Comment hi def link dockerfileOption Special let b:current_syntax = "dockerfile"