Vim Synthwave

This commit is contained in:
Alicia Sykes 2021-02-04 11:01:07 +00:00
parent 8034408e1d
commit f3b5c2b0c2
11 changed files with 743 additions and 1 deletions

291
vim/colors/synthwave.vim Normal file
View File

@ -0,0 +1,291 @@
" Name: Synthwave84
" Author: Anikin Artyom <anikinartyom@gmail.com>
" Maintainer: Anikin Artyom <anikinartyom@gmail.com>
" Website: https://github.com/artanikin/vim-synthwave84
" License: Vim License (see `:help license`)
" Last Updated: Wed Aug 7 12:28:29 2019
" Generated by Colortemplate v2.0.0
set background=dark
hi clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'synthwave84'
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
hi! link EndOfBuffer NonText
hi! link QuickFixLine Search
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
hi! link Define PreProc
hi! link Debug Special
hi! link Delimiter Special
hi! link Exception Statement
hi! link Float Number
hi! link Function Identifier
hi! link Keyword Statement
hi! link Label Statement
hi! link Macro PreProc
hi! link Number Constant
hi! link Operator Statement
hi! link PreCondit PreProc
hi! link Repeat Statement
hi! link SpecialChar Special
hi! link SpecialComment Special
hi! link StorageClass Type
hi! link Structure Type
hi! link Tag Special
hi! link Typedef Type
hi! link lCursor Cursor
hi! link jsFlowMaybe Normal
hi! link jsFlowObject Normal
hi! link jsFlowType PreProc
hi! link jsClassDefinition Normal
hi! link jsClassFuncName Title
hi! link jsImport Include
hi! link jsExport Include
hi! link jsFrom PreProc
hi! link jsFuncName Identifier
hi! link jsFutureKeys Statement
hi! link jsFuncCall Identifier
hi! link jsModuleKeywords Statement
hi! link jsModuleOperators Statement
hi! link jsNull Constant
hi! link jsObjectFuncName Identifier
hi! link jsObjectKey Title
hi! link jsSuper Statement
hi! link jsTemplateBraces Special
hi! link jsUndefined Constant
hi! link jsFunction PreProc
hi! link jsThis Constant
hi! link jsStorageClass PreProc
hi! link jsVariableDef Title
hi! link jsAsyncKeyword Title
hi! link jsFuncArgs Title
hi! link jsArrowFuncArgs Title
hi! link jsArrowFunction PreProc
hi! link jsObjectShorthandProp Title
hi! link jsGlobalObjects Constant
hi! link jsModuleKeyword Title
hi! link jsClassStringKey Title
hi! link jsObjectKeyComputed Title
hi! link jsObjectValue Title
hi! link jsBlockLabel Title
hi! link jsBlockLabelKey Title
hi! link rubyClass PreProc
hi! link rubyConstant Constant
hi! link rubyInstanceVariable Title
hi! link rubyInterpolationDelimiter Identifier
hi! link rubyModule Statement
hi! link rubyFunction Identifier
hi! link rubyInclude Include
hi! link markdownBold Special
hi! link markdownCode String
hi! link markdownCodeDelimiter String
hi! link markdownHeadingDelimiter Comment
hi! link markdownRule Comment
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['Black', 'DarkRed', 'DarkGreen', 'DarkYellow',
\ 'DarkBlue', 'DarkMagenta', 'DarkCyan', 'LightGrey', 'DarkGrey', 'Red',
\ 'Green', '#FEDE5D', 'Blue', '#D884C7', 'Cyan', 'White']
hi Normal guifg=#ECEBED guibg=#262335 guisp=NONE gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Cursor guifg=Black guibg=fg guisp=NONE gui=NONE cterm=NONE
hi CursorColumn guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi CursorLineNr guifg=#D4D3D7 guibg=#2C2540 guisp=NONE gui=bold cterm=bold
hi DiffAdd guifg=NONE guibg=#90DEB6 guisp=NONE gui=NONE cterm=NONE
hi DiffChange guifg=NONE guibg=#D884C7 guisp=NONE gui=NONE cterm=NONE
hi DiffDelete guifg=Black guibg=#EB8F82 guisp=NONE gui=bold cterm=bold
hi DiffText guifg=NONE guibg=Red guisp=NONE gui=bold cterm=bold
hi FoldColumn guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Folded guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi LineNr guifg=#888690 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi NonText guifg=#495495 guibg=NONE guisp=NONE gui=bold cterm=bold
hi Pmenu guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#3E3B4B guisp=NONE gui=NONE cterm=NONE
hi PmenuSel guifg=#ECEBED guibg=#495495 guisp=NONE gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ECEBED guisp=NONE gui=NONE cterm=NONE
hi Search guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi SignColumn guifg=#888690 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi SignColumn guifg=#ECEBED guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=bold,reverse cterm=bold,reverse
hi StatusLineNC guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=reverse cterm=reverse
hi TabLine guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi TabLineSel guifg=#EB8F82 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Title guifg=#D884C7 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Todo guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi VertSplit guifg=#2C2540 guibg=#495495 guisp=NONE gui=reverse cterm=reverse
hi Visual guifg=NONE guibg=#3E3B4B guisp=NONE gui=NONE cterm=NONE
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=bold,underline ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi Comment guifg=#495495 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Constant guifg=#E55A5E guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Error guifg=#ECEBED guibg=Red guisp=NONE gui=NONE cterm=NONE
hi Identifier guifg=#40ffff guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Ignore guifg=Black guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Include guifg=#90DEB6 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi PreProc guifg=#FEDE5D guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Special guifg=#EA9652 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Statement guifg=#FEDE5D guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi String guifg=#EA9652 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Type guifg=#E55A5E guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Underlined guifg=#40ffff guibg=NONE guisp=NONE gui=underline cterm=underline
hi rubySymbol guifg=#EB8F82 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi rubyBoolean guifg=#EB8F82 guibg=NONE guisp=NONE gui=NONE cterm=NONE
unlet s:t_Co
finish
endif
if s:t_Co >= 256
hi Normal ctermfg=7 ctermbg=8 cterm=NONE
if !has('patch-8.0.0616') " Fix for Vim bug
set background=dark
endif
hi ColorColumn ctermfg=NONE ctermbg=7 cterm=NONE
hi Cursor ctermbg=fg cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=7 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=7 cterm=NONE
hi CursorLineNr ctermfg=7 ctermbg=7 cterm=NONE
hi DiffAdd ctermfg=NONE ctermbg=121 cterm=NONE
hi DiffChange ctermfg=NONE ctermbg=13 cterm=NONE
hi DiffDelete ctermbg=224 cterm=NONE
hi DiffText ctermfg=NONE ctermbg=9 cterm=bold
hi FoldColumn ctermfg=14 ctermbg=7 cterm=NONE
hi Folded ctermfg=14 ctermbg=7 cterm=NONE
hi LineNr ctermfg=7 ctermbg=NONE cterm=NONE
hi NonText ctermfg=14 ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=7 ctermbg=7 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=8 cterm=NONE
hi PmenuSel ctermfg=7 ctermbg=14 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=7 cterm=NONE
hi Search ctermbg=11 cterm=NONE
hi SignColumn ctermfg=7 ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=7 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=7 ctermbg=7 cterm=NONE
hi StatusLine ctermfg=7 ctermbg=7 cterm=bold,reverse
hi StatusLineNC ctermfg=7 ctermbg=7 cterm=reverse
hi TabLine ctermfg=14 ctermbg=7 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=7 cterm=NONE
hi TabLineSel ctermfg=224 ctermbg=7 cterm=NONE
hi Title ctermfg=13 ctermbg=NONE cterm=NONE
hi Todo ctermbg=11 cterm=NONE
hi VertSplit ctermfg=7 ctermbg=14 cterm=reverse
hi Visual ctermfg=NONE ctermbg=8 cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu ctermbg=11 cterm=NONE
hi Comment ctermfg=14 ctermbg=NONE cterm=NONE
hi Constant ctermfg=9 ctermbg=NONE cterm=NONE
hi Error ctermfg=7 ctermbg=9 cterm=NONE
hi Identifier ctermfg=14 ctermbg=NONE cterm=NONE
hi Ignore ctermbg=NONE cterm=NONE
hi Include ctermfg=121 ctermbg=NONE cterm=NONE
hi PreProc ctermfg=11 ctermbg=NONE cterm=NONE
hi Special ctermfg=224 ctermbg=NONE cterm=NONE
hi Statement ctermfg=11 ctermbg=NONE cterm=NONE
hi String ctermfg=224 ctermbg=NONE cterm=NONE
hi Type ctermfg=9 ctermbg=NONE cterm=NONE
hi Underlined ctermfg=14 ctermbg=NONE cterm=underline
hi rubySymbol ctermfg=224 ctermbg=NONE cterm=NONE
hi rubyBoolean ctermfg=224 ctermbg=NONE cterm=NONE
unlet s:t_Co
finish
endif
if s:t_Co >= 8
hi Normal ctermfg=LightGray ctermbg=DarkGray cterm=NONE
if !has('patch-8.0.0616') " Fix for Vim bug
set background=dark
endif
hi ColorColumn ctermfg=NONE ctermbg=LightGray cterm=NONE
hi Cursor ctermfg=Black ctermbg=fg cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=LightGray cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=LightGray cterm=NONE
hi CursorLineNr ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi DiffAdd ctermfg=NONE ctermbg=LightGreen cterm=NONE
hi DiffChange ctermfg=NONE ctermbg=Magenta cterm=NONE
hi DiffDelete ctermfg=Black ctermbg=LightRed cterm=NONE
hi DiffText ctermfg=NONE ctermbg=Red cterm=bold
hi FoldColumn ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi Folded ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi LineNr ctermfg=LightGray ctermbg=NONE cterm=NONE
hi NonText ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=DarkGray cterm=NONE
hi PmenuSel ctermfg=LightGray ctermbg=Cyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=LightGray cterm=NONE
hi Search ctermfg=Black ctermbg=Yellow cterm=NONE
hi SignColumn ctermfg=LightGray ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=LightGray ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi StatusLine ctermfg=LightGray ctermbg=LightGray cterm=bold,reverse
hi StatusLineNC ctermfg=LightGray ctermbg=LightGray cterm=reverse
hi TabLine ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=LightGray cterm=NONE
hi TabLineSel ctermfg=LightRed ctermbg=LightGray cterm=NONE
hi Title ctermfg=Magenta ctermbg=NONE cterm=NONE
hi Todo ctermfg=Black ctermbg=Yellow cterm=NONE
hi VertSplit ctermfg=LightGray ctermbg=Cyan cterm=reverse
hi Visual ctermfg=NONE ctermbg=DarkGray cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu ctermfg=Black ctermbg=Yellow cterm=NONE
hi Comment ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Constant ctermfg=Red ctermbg=NONE cterm=NONE
hi Error ctermfg=LightGray ctermbg=Red cterm=NONE
hi Identifier ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Ignore ctermfg=Black ctermbg=NONE cterm=NONE
hi Include ctermfg=LightGreen ctermbg=NONE cterm=NONE
hi PreProc ctermfg=Yellow ctermbg=NONE cterm=NONE
hi Special ctermfg=LightRed ctermbg=NONE cterm=NONE
hi Statement ctermfg=Yellow ctermbg=NONE cterm=NONE
hi String ctermfg=LightRed ctermbg=NONE cterm=NONE
hi Type ctermfg=Red ctermbg=NONE cterm=NONE
hi Underlined ctermfg=Cyan ctermbg=NONE cterm=underline
hi rubySymbol ctermfg=LightRed ctermbg=NONE cterm=NONE
hi rubyBoolean ctermfg=LightRed ctermbg=NONE cterm=NONE
unlet s:t_Co
finish
endif
" Color: black Black 0 Black
" Color: blue Blue 12 Blue
" Color: cyan Cyan 14 Cyan
" Color: cyanidentifier #40ffff 14 Cyan
" Color: darkblue DarkBlue 4 DarkBlue
" Color: darkcyan DarkCyan 6 DarkCyan
" Color: darkgreen DarkGreen 2 DarkGreen
" Color: darkmagenta DarkMagenta 5 DarkMagenta
" Color: darkred DarkRed 1 DarkRed
" Color: green Green 10 Green
" Color: lightgrey LightGrey 7 LightGrey
" Color: red Red 9 Red
" Color: white White 15 White
" Color: darkyellow DarkYellow 3 DarkYellow
" Color: darkgrey DarkGrey 8 DarkGrey
" Color: s_steelgray #262335 8 DarkGray
" Color: s_white #ECEBED 7 LightGray
" Color: s_tolopea #2C2540 7 LightGray
" Color: s_oslogray #888690 7 LightGray
" Color: s_lightgray #D4D3D7 7 LightGray
" Color: s_yellow #FEDE5D 11 Yellow
" Color: s_governorbay #495495 14 Cyan
" Color: s_grape #3E3B4B 8 DarkGray
" Color: s_red #E55A5E 9 Red
" Color: s_lightred #EB8F82 224 LightRed
" Color: s_magenta #D884C7 13 Magenta
" Color: s_orange #EA9652 224 LightRed
" Color: s_green #90DEB6 121 LightGreen
" Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan lightgrey
" Term Colors: darkgrey red green s_yellow blue s_magenta cyan white
" Background: dark
" vim: et ts=2 sw=2

View File

@ -171,6 +171,10 @@ set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
" Set font to Hack
set guifont=Hack:h20
set guifont=Monospace:h20
" Set color schemes, when availible
augroup colorscheme_customization
au!
@ -179,7 +183,7 @@ augroup colorscheme_customization
endif
if has_key(g:plugs, 'dracula')
let g:dracula_bold = 1
let g:_bold = 1
let g:dracula_italic = 1
let g:dracula_colorterm = 0
@ -193,6 +197,8 @@ augroup colorscheme_customization
endif
augroup END
colorscheme synthwave
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo

View File

@ -0,0 +1,8 @@
" vint: -ProhibitAutocmdWithNoGroup
" Dockerfile
autocmd BufRead,BufNewFile [Dd]ockerfile set ft=Dockerfile
autocmd BufRead,BufNewFile Dockerfile* set ft=Dockerfile
autocmd BufRead,BufNewFile [Dd]ockerfile.vim set ft=vim
autocmd BufRead,BufNewFile *.dock set ft=Dockerfile
autocmd BufRead,BufNewFile *.[Dd]ockerfile set ft=Dockerfile

View File

@ -0,0 +1,4 @@
" vint: -ProhibitAutocmdWithNoGroup
" docker-compose.yml
autocmd BufRead,BufNewFile docker-compose*.{yaml,yml}* set ft=yaml.docker-compose

View 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>

View File

@ -0,0 +1,5 @@
" Define comment string
setlocal commentstring=#\ %s
" Enable automatic comment insertion
setlocal formatoptions+=cro

23
vim/indent/Dockerfile.vim Normal file
View 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)

View File

@ -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}"

View File

@ -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
vim/syntax/Dockerfile.vim Normal file
View 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"

View File

@ -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"