git subrepo clone (merge) https://github.com/ekalinin/dockerfile.vim.git ./dotfiles/.vim/plugged/dockerfile.vim
subrepo: subdir: "dotfiles/.vim/plugged/dockerfile.vim" merged: "2a31e6bc" upstream: origin: "https://github.com/ekalinin/dockerfile.vim.git" branch: "master" commit: "2a31e6bc" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
This commit is contained in:
parent
78b956b821
commit
76b2929ec8
15 changed files with 561 additions and 0 deletions
2
dotfiles/.vim/plugged/dockerfile.vim/.gitignore
vendored
Normal file
2
dotfiles/.vim/plugged/dockerfile.vim/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.swp
|
||||||
|
*.swo
|
12
dotfiles/.vim/plugged/dockerfile.vim/.gitrepo
Normal file
12
dotfiles/.vim/plugged/dockerfile.vim/.gitrepo
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
; DO NOT EDIT (unless you know what you are doing)
|
||||||
|
;
|
||||||
|
; This subdirectory is a git "subrepo", and this file is maintained by the
|
||||||
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
|
;
|
||||||
|
[subrepo]
|
||||||
|
remote = https://github.com/ekalinin/dockerfile.vim.git
|
||||||
|
branch = master
|
||||||
|
commit = 2a31e6bcea5977209c05c728c4253d82fd873c82
|
||||||
|
parent = 78b956b821bb0c96c5b2804c1461df0eb28cc559
|
||||||
|
method = merge
|
||||||
|
cmdver = 0.4.3
|
20
dotfiles/.vim/plugged/dockerfile.vim/LICENSE
Normal file
20
dotfiles/.vim/plugged/dockerfile.vim/LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2013 Eugene Kalinin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
dotfiles/.vim/plugged/dockerfile.vim/Makefile
Normal file
22
dotfiles/.vim/plugged/dockerfile.vim/Makefile
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
install:
|
||||||
|
@echo "Installation:"
|
||||||
|
@mkdir -p ~/.vim/syntax
|
||||||
|
@mkdir -p ~/.vim/indent
|
||||||
|
@mkdir -p ~/.vim/ftdetect
|
||||||
|
@mkdir -p ~/.vim/ftplugin
|
||||||
|
@mkdir -p ~/.vim/snippets
|
||||||
|
@echo " * Dirs ... success."
|
||||||
|
@cp ./syntax/Dockerfile.vim ~/.vim/syntax/
|
||||||
|
@cp ./syntax/docker-compose.vim ~/.vim/syntax/
|
||||||
|
@echo " * Ident ... success."
|
||||||
|
@cp ./indent/Dockerfile.vim ~/.vim/indent/
|
||||||
|
@echo " * Syntax ... success."
|
||||||
|
@cp ./ftdetect/Dockerfile.vim ~/.vim/ftdetect/
|
||||||
|
@cp ./ftdetect/docker-compose.vim ~/.vim/ftdetect/
|
||||||
|
@echo " * Filetype ... success."
|
||||||
|
@cp ./ftplugin/Dockerfile.vim ~/.vim/ftplugin/
|
||||||
|
@cp ./ftplugin/docker-compose.vim ~/.vim/ftplugin/
|
||||||
|
@echo " * Plugin ... success."
|
||||||
|
@cp ./snippets/Dockerfile.snippets ~/.vim/snippets/
|
||||||
|
@cp ./snippets/docker-compose.snippets ~/.vim/snippets/
|
||||||
|
@echo " * Snippets ... success."
|
55
dotfiles/.vim/plugged/dockerfile.vim/README.md
Normal file
55
dotfiles/.vim/plugged/dockerfile.vim/README.md
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
Dockerfile.vim
|
||||||
|
==============
|
||||||
|
|
||||||
|
Vim syntax file for [Docker](http://docker.io/)'s [Dockerfile](http://docs.docker.com/reference/builder/)
|
||||||
|
and snippets for [snipMate](http://www.vim.org/scripts/script.php?script_id=2540).
|
||||||
|
|
||||||
|
Screenshot
|
||||||
|
==========
|
||||||
|
|
||||||
|
Here is an example in gnome-terminal with [vim-monokai](https://github.com/sickill/vim-monokai) color scheme:
|
||||||
|
|
||||||
|
|
||||||
|
![Vim & Dockerfile.vim ](https://raw.github.com/ekalinin/Dockerfile.vim/master/vim-dockerfile-example.png)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git clone https://github.com/ekalinin/Dockerfile.vim.git
|
||||||
|
$ cd Dockerfile.vim
|
||||||
|
$ make install
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Or using Pathogen:
|
||||||
|
```bash
|
||||||
|
# Clone directly into the bundle folder.
|
||||||
|
git clone https://github.com/ekalinin/Dockerfile.vim.git ~/.vim/bundle/Dockerfile
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Or using Vundle:
|
||||||
|
```bash
|
||||||
|
# near the top of your .vimrc
|
||||||
|
Plugin 'ekalinin/Dockerfile.vim'
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Or using NeoBundle:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
NeoBundle 'ekalinin/Dockerfile.vim'
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Or using Vim-Plug
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Inside the Vim-Plug block on your .vimrc
|
||||||
|
Plug 'ekalinin/Dockerfile.vim'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
See [LICENSE](https://github.com/ekalinin/Dockerfile.vim/blob/master/LICENSE) file.
|
13
dotfiles/.vim/plugged/dockerfile.vim/ftdetect/Dockerfile.vim
Normal file
13
dotfiles/.vim/plugged/dockerfile.vim/ftdetect/Dockerfile.vim
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
" vint: -ProhibitAutocmdWithNoGroup
|
||||||
|
|
||||||
|
" Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile [Dd]ockerfile set ft=Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile [Dd]ockerfile* setfiletype Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile *.[Dd]ockerfile set ft=Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile *.dock set ft=Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile [Dd]ockerfile.vim set ft=vim
|
||||||
|
|
||||||
|
" Containerfile
|
||||||
|
autocmd BufRead,BufNewFile [Cc]ontainerfile set ft=Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile [Cc]ontainerfile* set ft=Dockerfile
|
||||||
|
autocmd BufRead,BufNewFile *.[Cc]ontainerfile set ft=Dockerfile
|
|
@ -0,0 +1,4 @@
|
||||||
|
" vint: -ProhibitAutocmdWithNoGroup
|
||||||
|
|
||||||
|
" docker-compose.yml
|
||||||
|
autocmd BufRead,BufNewFile docker-compose*.{yaml,yml}* set ft=yaml.docker-compose
|
33
dotfiles/.vim/plugged/dockerfile.vim/ftplugin/Dockerfile.vim
Normal file
33
dotfiles/.vim/plugged/dockerfile.vim/ftplugin/Dockerfile.vim
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
" Define comment string
|
||||||
|
setlocal commentstring=#\ %s
|
||||||
|
|
||||||
|
" Enable automatic comment insertion
|
||||||
|
setlocal formatoptions+=cro
|
||||||
|
|
||||||
|
function! DockerfileReplaceInstruction(original, replacement)
|
||||||
|
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
|
||||||
|
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
|
||||||
|
let word = a:replacement
|
||||||
|
else
|
||||||
|
let word = a:original
|
||||||
|
endif
|
||||||
|
let g:UnduBuffer = a:original
|
||||||
|
return word
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoreabbr <silent> <buffer> from <C-R>=DockerfileReplaceInstruction("from", "FROM")<CR>
|
||||||
|
inoreabbr <silent> <buffer> maintainer <C-R>=DockerfileReplaceInstruction("maintainer", "MAINTAINER")<CR>
|
||||||
|
inoreabbr <silent> <buffer> run <C-R>=DockerfileReplaceInstruction("run", "RUN")<CR>
|
||||||
|
inoreabbr <silent> <buffer> cmd <C-R>=DockerfileReplaceInstruction("cmd", "CMD")<CR>
|
||||||
|
inoreabbr <silent> <buffer> label <C-R>=DockerfileReplaceInstruction("label", "LABEL")<CR>
|
||||||
|
inoreabbr <silent> <buffer> expose <C-R>=DockerfileReplaceInstruction("expose", "EXPOSE")<CR>
|
||||||
|
inoreabbr <silent> <buffer> env <C-R>=DockerfileReplaceInstruction("env", "ENV")<CR>
|
||||||
|
inoreabbr <silent> <buffer> add <C-R>=DockerfileReplaceInstruction("add", "ADD")<CR>
|
||||||
|
inoreabbr <silent> <buffer> copy <C-R>=DockerfileReplaceInstruction("copy", "COPY")<CR>
|
||||||
|
inoreabbr <silent> <buffer> entrypoint <C-R>=DockerfileReplaceInstruction("entrypoint", "ENTRYPOINT")<CR>
|
||||||
|
inoreabbr <silent> <buffer> volume <C-R>=DockerfileReplaceInstruction("volume", "VOLUME")<CR>
|
||||||
|
inoreabbr <silent> <buffer> user <C-R>=DockerfileReplaceInstruction("user", "USER")<CR>
|
||||||
|
inoreabbr <silent> <buffer> workdir <C-R>=DockerfileReplaceInstruction("workdir", "WORKDIR")<CR>
|
||||||
|
inoreabbr <silent> <buffer> arg <C-R>=DockerfileReplaceInstruction("arg", "ARG")<CR>
|
||||||
|
inoreabbr <silent> <buffer> onbuild <C-R>=DockerfileReplaceInstruction("onbuild", "ONBUILD")<CR>
|
||||||
|
inoreabbr <silent> <buffer> stopsignal <C-R>=DockerfileReplaceInstruction("stopsignal", "STOPSIGNAL")<CR>
|
|
@ -0,0 +1,5 @@
|
||||||
|
" Define comment string
|
||||||
|
setlocal commentstring=#\ %s
|
||||||
|
|
||||||
|
" Enable automatic comment insertion
|
||||||
|
setlocal formatoptions+=cro
|
23
dotfiles/.vim/plugged/dockerfile.vim/indent/Dockerfile.vim
Normal file
23
dotfiles/.vim/plugged/dockerfile.vim/indent/Dockerfile.vim
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
if exists('b:did_indent') | finish | endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
|
||||||
|
function! DockerfileIndent(line)
|
||||||
|
let prev_line = getline(a:line - 1)
|
||||||
|
if a:line > 1 && prev_line =~ '\\\s*$'
|
||||||
|
let i = indent(a:line - 1)
|
||||||
|
if i == 0
|
||||||
|
let i += &l:shiftwidth
|
||||||
|
if &l:expandtab && prev_line =~# '^RUN\s'
|
||||||
|
" Overindent past RUN
|
||||||
|
let i = 4 + &l:shiftwidth
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
return i
|
||||||
|
endif
|
||||||
|
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
set indentexpr=DockerfileIndent(v:lnum)
|
|
@ -0,0 +1,67 @@
|
||||||
|
snippet F
|
||||||
|
FROM ${1:ubuntu}
|
||||||
|
snippet f
|
||||||
|
FROM ${1:ubuntu}
|
||||||
|
snippet M
|
||||||
|
LABEL maintainer="${1:name}"
|
||||||
|
snippet m
|
||||||
|
LABEL maintainer="${1:name}"
|
||||||
|
snippet R
|
||||||
|
RUN ${1:command}
|
||||||
|
snippet r
|
||||||
|
RUN ${1:command}
|
||||||
|
snippet C
|
||||||
|
CMD ${1:command}
|
||||||
|
snippet c
|
||||||
|
CMD ${1:command}
|
||||||
|
snippet CP
|
||||||
|
COPY ${1:src} ${2:dest}
|
||||||
|
snippet cp
|
||||||
|
COPY ${1:src} ${2:dest}
|
||||||
|
snippet EXP
|
||||||
|
EXPOSE ${1:port}
|
||||||
|
snippet exp
|
||||||
|
EXPOSE ${1:port}
|
||||||
|
snippet E
|
||||||
|
ENV ${1:key} ${2:value}
|
||||||
|
snippet e
|
||||||
|
ENV ${1:key} ${2:value}
|
||||||
|
snippet A
|
||||||
|
ADD ${1:src} ${2:dst}
|
||||||
|
snippet a
|
||||||
|
ADD ${1:src} ${2:dst}
|
||||||
|
snippet ENT
|
||||||
|
ENTRYPOINT ${1:command}
|
||||||
|
snippet ent
|
||||||
|
ENTRYPOINT ${1:command}
|
||||||
|
snippet V
|
||||||
|
VOLUME ["${1:path}"]
|
||||||
|
snippet v
|
||||||
|
VOLUME ["${1:path}"]
|
||||||
|
snippet U
|
||||||
|
USER ${1:name}
|
||||||
|
snippet u
|
||||||
|
USER ${1:name}
|
||||||
|
snippet W
|
||||||
|
WORKDIR ${1:path}
|
||||||
|
snippet w
|
||||||
|
WORKDIR ${1:path}
|
||||||
|
snippet upd
|
||||||
|
# update packages
|
||||||
|
RUN echo "deb http://archive.ubuntu.com/ubuntu ${1:precise} main universe" > /etc/apt/sources.list; \
|
||||||
|
apt-get update && apt-get -y upgrade; \
|
||||||
|
${2}
|
||||||
|
;rm -rf /var/lib/apt/lists/*
|
||||||
|
snippet head
|
||||||
|
# ${1:Description}
|
||||||
|
#
|
||||||
|
# VERSION ${2:0.1.0}
|
||||||
|
${3}
|
||||||
|
snippet O
|
||||||
|
ONBUILD ${1}
|
||||||
|
snippet o
|
||||||
|
ONBUILD ${1}
|
||||||
|
snippet L
|
||||||
|
LABEL ${1:label}="${2:value}"
|
||||||
|
snippet l
|
||||||
|
LABEL ${1:label}="${2:value}"
|
|
@ -0,0 +1,166 @@
|
||||||
|
snippet ve
|
||||||
|
version: '${1:3}'
|
||||||
|
snippet volumes
|
||||||
|
volumes:
|
||||||
|
- ${1:value}
|
||||||
|
snippet volume_
|
||||||
|
volume_driver: ${1:driver}
|
||||||
|
snippet volumes_
|
||||||
|
volumes_from:
|
||||||
|
- ${1:name}
|
||||||
|
snippet exter
|
||||||
|
external: ${1:boolean}
|
||||||
|
snippet ser
|
||||||
|
services:
|
||||||
|
${1:name}
|
||||||
|
snippet bu
|
||||||
|
build:
|
||||||
|
${1:value}
|
||||||
|
snippet conte
|
||||||
|
context: ${1:dir}
|
||||||
|
snippet com
|
||||||
|
command: ${1:command}
|
||||||
|
snippet dep
|
||||||
|
depends_on:
|
||||||
|
${1:value}
|
||||||
|
snippet env
|
||||||
|
environment:
|
||||||
|
${1:name}: ${2:value}
|
||||||
|
snippet doc
|
||||||
|
dockerfile: ${1:file}
|
||||||
|
snippet ar
|
||||||
|
args:
|
||||||
|
${1:name}: ${2:value}
|
||||||
|
snippet cap_a
|
||||||
|
cap_add:
|
||||||
|
- ${1:value}
|
||||||
|
snippet cap_d
|
||||||
|
cap_drop:
|
||||||
|
- ${1:value}
|
||||||
|
snippet cgr
|
||||||
|
cgroup_parent: ${1:cgroup}
|
||||||
|
snippet conta
|
||||||
|
container_name: ${1:name}
|
||||||
|
snippet dev
|
||||||
|
devices:
|
||||||
|
- ${1:value}
|
||||||
|
snippet dn
|
||||||
|
dns:
|
||||||
|
- ${1:ip}
|
||||||
|
snippet dns_
|
||||||
|
dns_search:
|
||||||
|
- ${1:ip}
|
||||||
|
snippet tm
|
||||||
|
tmpfs:
|
||||||
|
- ${1:dir}
|
||||||
|
snippet ent
|
||||||
|
entrypoint: ${1:command}
|
||||||
|
snippet env_
|
||||||
|
env_file:
|
||||||
|
- ${1:file}
|
||||||
|
snippet exp
|
||||||
|
expose:
|
||||||
|
- ${1:port}
|
||||||
|
snippet exten
|
||||||
|
extends:
|
||||||
|
file: ${1:file}
|
||||||
|
service: ${2:name}
|
||||||
|
snippet extr
|
||||||
|
extra_hosts:
|
||||||
|
- ${1:host}:${2:ip}
|
||||||
|
snippet gr
|
||||||
|
group_add:
|
||||||
|
- ${1:name}
|
||||||
|
snippet im
|
||||||
|
image: ${1:image}
|
||||||
|
snippet la
|
||||||
|
labels:
|
||||||
|
${1:dns}: ${2:label}
|
||||||
|
snippet links
|
||||||
|
links:
|
||||||
|
- ${1:name}
|
||||||
|
snippet logg
|
||||||
|
logging:
|
||||||
|
driver: ${1:driver}
|
||||||
|
options:
|
||||||
|
${2:value}
|
||||||
|
snippet log_d
|
||||||
|
log_driver: ${1:driver}
|
||||||
|
snippet log_o
|
||||||
|
log_opt:
|
||||||
|
${1:value}
|
||||||
|
snippet net
|
||||||
|
net: ${1:value}
|
||||||
|
snippet network_
|
||||||
|
network_mode: ${1:value}
|
||||||
|
snippet networks
|
||||||
|
networks:
|
||||||
|
- ${1:value}
|
||||||
|
snippet al
|
||||||
|
networks:
|
||||||
|
- ${1:name}
|
||||||
|
snippet ipv4
|
||||||
|
ipv4_address: ${1:ip}
|
||||||
|
snippet ipv6
|
||||||
|
ipv6_address: ${1:ip}
|
||||||
|
snippet link_
|
||||||
|
link_local_ips:
|
||||||
|
- ${1:ip}
|
||||||
|
snippet pi
|
||||||
|
pid: ${1:host}
|
||||||
|
snippet po
|
||||||
|
ports:
|
||||||
|
- ${1:value}
|
||||||
|
snippet sec
|
||||||
|
security_opt:
|
||||||
|
- ${1:value}
|
||||||
|
snippet sto
|
||||||
|
stop_signal: ${1:signal}
|
||||||
|
snippet ul
|
||||||
|
ulimits:
|
||||||
|
${1:value}
|
||||||
|
snippet cpu_s
|
||||||
|
cpu_shares: ${1:value}
|
||||||
|
snippet cpu_q
|
||||||
|
cpu_quota: ${1:value}
|
||||||
|
snippet cpus
|
||||||
|
cpuset: ${1:value}
|
||||||
|
snippet dom
|
||||||
|
domainname: ${1:name}
|
||||||
|
snippet ho
|
||||||
|
hostname: ${1:name}
|
||||||
|
snippet ipc
|
||||||
|
ipc: ${1:host}
|
||||||
|
snippet mem_
|
||||||
|
mem_limit: ${1:value}
|
||||||
|
snippet mems
|
||||||
|
memswap_limit: ${1:value}
|
||||||
|
snippet pr
|
||||||
|
privileged: ${1:boolean}
|
||||||
|
snippet oom
|
||||||
|
oom_score_adj: ${1:value}
|
||||||
|
snippet res
|
||||||
|
restart: ${1:value}
|
||||||
|
snippet us
|
||||||
|
user: ${1:value}
|
||||||
|
snippet wo
|
||||||
|
working_dir: ${1:dir}
|
||||||
|
snippet rea
|
||||||
|
read_only: ${1:boolean}
|
||||||
|
snippet sh
|
||||||
|
shm_size: ${1:value}
|
||||||
|
snippet std
|
||||||
|
stdin_open: ${1:boolean}
|
||||||
|
snippet tt
|
||||||
|
tty: ${1:boolean}
|
||||||
|
snippet driver
|
||||||
|
driver: ${1:value}
|
||||||
|
snippet driver_
|
||||||
|
driver_opts:
|
||||||
|
${1:key}: ${2:value}
|
||||||
|
snippet ipa
|
||||||
|
ipam:
|
||||||
|
${1:value}
|
||||||
|
snippet hc
|
||||||
|
healthcheck:
|
||||||
|
test: ${1:command}
|
59
dotfiles/.vim/plugged/dockerfile.vim/syntax/Dockerfile.vim
Normal file
59
dotfiles/.vim/plugged/dockerfile.vim/syntax/Dockerfile.vim
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: Dockerfile
|
||||||
|
" Maintainer: Eugene Kalinin
|
||||||
|
" Latest Revision: 11 September 2013
|
||||||
|
" Source: http://docs.docker.io/en/latest/use/builder/
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" case sensitivity (fix #17)
|
||||||
|
" syn case ignore
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
syn keyword dockerfileKeywords FROM AS MAINTAINER RUN CMD COPY
|
||||||
|
syn keyword dockerfileKeywords EXPOSE ADD ENTRYPOINT
|
||||||
|
syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD
|
||||||
|
syn keyword dockerfileKeywords LABEL ARG HEALTHCHECK SHELL STOPSIGNAL
|
||||||
|
|
||||||
|
" Bash statements
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
|
||||||
|
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
|
||||||
|
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
|
||||||
|
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
|
||||||
|
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
|
||||||
|
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
|
||||||
|
syn keyword bashStatement wget gzip
|
||||||
|
|
||||||
|
" Strings
|
||||||
|
syn region dockerfileString start=/"/ skip=/\\"|\\\\/ end=/"/
|
||||||
|
syn region dockerfileString1 start=/'/ skip=/\\'|\\\\/ end=/'/
|
||||||
|
|
||||||
|
" Emails
|
||||||
|
syn region dockerfileEmail start=/</ end=/>/ contains=@ oneline
|
||||||
|
|
||||||
|
" Urls
|
||||||
|
syn match dockerfileUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\._]\+/
|
||||||
|
|
||||||
|
" Task tags
|
||||||
|
syn keyword dockerfileTodo contained TODO FIXME XXX
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn region dockerfileComment start="#" end="\n" contains=dockerfileTodo
|
||||||
|
syn region dockerfileEnvWithComment start="^\s*ENV\>" end="\n" contains=dockerfileEnv
|
||||||
|
syn match dockerfileEnv contained /\<ENV\>/
|
||||||
|
|
||||||
|
" Highlighting
|
||||||
|
hi link dockerfileKeywords Keyword
|
||||||
|
hi link dockerfileEnv Keyword
|
||||||
|
hi link dockerfileString String
|
||||||
|
hi link dockerfileString1 String
|
||||||
|
hi link dockerfileComment Comment
|
||||||
|
hi link dockerfileEmail Identifier
|
||||||
|
hi link dockerfileUrl Identifier
|
||||||
|
hi link dockerfileTodo Todo
|
||||||
|
hi link bashStatement Function
|
||||||
|
|
||||||
|
let b:current_syntax = "dockerfile"
|
|
@ -0,0 +1,80 @@
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: Dockerfile
|
||||||
|
" Maintainer: Eugene Kalinin
|
||||||
|
" Latest Revision: 11 September 2013
|
||||||
|
" Source: https://docs.docker.com/compose/
|
||||||
|
|
||||||
|
if !exists('main_syntax')
|
||||||
|
let main_syntax = 'yaml'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" case sensitivity (fix #17)
|
||||||
|
" syn case ignore
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
syn keyword dockercomposeKeywords build context dockerfile args cap_add cap_drop
|
||||||
|
syn keyword dockercomposeKeywords command cgroup_parent container_name devices depends_on
|
||||||
|
syn keyword dockercomposeKeywords dns dns_search tmpfs entrypoint env_file environment
|
||||||
|
syn keyword dockercomposeKeywords expose extends extends external_links extra_hosts
|
||||||
|
syn keyword dockercomposeKeywords group_add image isolation labels links
|
||||||
|
syn keyword dockercomposeKeywords log_opt net network_mode networks aliases
|
||||||
|
syn keyword dockercomposeKeywords ipv4_address ipv6_address link_local_ips pid ports
|
||||||
|
syn keyword dockercomposeKeywords security_opt stop_signal ulimits volumes volume_driver
|
||||||
|
syn keyword dockercomposeKeywords volumes_from cpu_shares cpu_quota cpuset domainname hostname
|
||||||
|
syn keyword dockercomposeKeywords ipc mac_address mem_limit memswap_limit oom_score_adj privileged
|
||||||
|
syn keyword dockercomposeKeywords read_only restart shm_size stdin_open tty user working_dir
|
||||||
|
syn keyword dockercomposeKeywords healthcheck test interval timeout retries disable sysctls
|
||||||
|
syn keyword dockercomposeKeywords userns_mode secrets
|
||||||
|
"" Volume configuration reference
|
||||||
|
syn keyword dockercomposeKeywords driver driver_opts external labels
|
||||||
|
"" Network configuration reference
|
||||||
|
syn keyword dockercomposeKeywords driver driver_opts enable_ipv6 ipam internal labels external
|
||||||
|
"" Versioning
|
||||||
|
syn keyword dockercomposeKeywords version services
|
||||||
|
"" Logging
|
||||||
|
syn keyword dockercomposeKeywords logging log_driver env options max-size max-file
|
||||||
|
syn keyword dockercomposeKeywords syslog-address syslog-facility syslog-tls-ca-cert syslog-tls-cert
|
||||||
|
syn keyword dockercomposeKeywords syslog-tls-key syslog-tls-skip tag syslog-format gelf-address
|
||||||
|
syn keyword dockercomposeKeywords gelf-compression-type gelf-compression-level fluentd-address
|
||||||
|
syn keyword dockercomposeKeywords fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries
|
||||||
|
syn keyword dockercomposeKeywords fluentd-async-connect awslogs-region awslogs-group awslogs-stream
|
||||||
|
syn keyword dockercomposeKeywords splunk-token splunk-url splunk-source splunk-sourcetype splunk-index
|
||||||
|
syn keyword dockercomposeKeywords splunk-capath splunk-caname splunk-insecureskipverify gcp-project log-cmd
|
||||||
|
|
||||||
|
" Bash statements
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
|
||||||
|
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
|
||||||
|
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
|
||||||
|
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
|
||||||
|
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
|
||||||
|
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
|
||||||
|
syn keyword bashStatement wget gzip
|
||||||
|
|
||||||
|
" Strings
|
||||||
|
syn region dockercomposeString start=/"/ skip=/\\"/ end=/"/
|
||||||
|
syn region dockercomposeString1 start=/'/ skip=/\\'/ end=/'/
|
||||||
|
|
||||||
|
" Emails
|
||||||
|
syn region dockercomposeEmail start=/</ end=/>/ contains=@ oneline
|
||||||
|
|
||||||
|
" Urls
|
||||||
|
syn match dockercomposeUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\.]\+/
|
||||||
|
|
||||||
|
" Task tags
|
||||||
|
syn keyword dockercomposeTodo contained TODO FIXME XXX
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn region dockercomposeComment start="#" end="\n" contains=dockercomposeTodo
|
||||||
|
|
||||||
|
" Highlighting
|
||||||
|
hi link dockercomposeKeywords Keyword
|
||||||
|
hi link dockercomposeString String
|
||||||
|
hi link dockercomposeString1 String
|
||||||
|
hi link dockercomposeComment Comment
|
||||||
|
hi link dockercomposeEmail Identifier
|
||||||
|
hi link dockercomposeUrl Identifier
|
||||||
|
hi link dockercomposeTodo Todo
|
||||||
|
hi link bashStatement Function
|
||||||
|
|
||||||
|
let b:current_syntax = "dockercompose"
|
BIN
dotfiles/.vim/plugged/dockerfile.vim/vim-dockerfile-example.png
Normal file
BIN
dotfiles/.vim/plugged/dockerfile.vim/vim-dockerfile-example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in a new issue