Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.swp | ||
*.swo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
install: | ||
@echo "Installation:" | ||
@mkdir -p ~/.vim/syntax | ||
@mkdir -p ~/.vim/ftdetect | ||
@mkdir -p ~/.vim/snippets | ||
@echo " * Dirs ... success." | ||
@cp ./syntax/Dockerfile.vim ~/.vim/syntax/ | ||
@echo " * Syntax ... success." | ||
@cp ./ftdetect/Dockerfile.vim ~/.vim/ftdetect/ | ||
@echo " * Filetype ... success." | ||
@cp ./snippets/Dockerfile.snippets ~/.vim/snippets/ | ||
@echo " * Snippets ... success." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 bundle/Dockerfile | ||
``` | ||
|
||
####OR using Vundle: | ||
```bash | ||
# near the top of your .vimrc | ||
Plugin 'ekalinin/Dockerfile.vim' | ||
``` | ||
|
||
License | ||
======= | ||
|
||
See [LICENSE](https://github.com/ekalinin/Dockerfile.vim/blob/master/LICENSE) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
" Dockerfile | ||
autocmd BufRead,BufNewFile Dockerfile set ft=Dockerfile | ||
autocmd BufRead,BufNewFile Dockerfile* setf Dockerfile | ||
autocmd BufRead,BufNewFile *.dock setf Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
snippet F | ||
FROM ${1:ubuntu} | ||
snippet f | ||
FROM ${1:ubuntu} | ||
snippet M | ||
MAINTAINER ${1:name} | ||
snippet m | ||
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} | ||
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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
" 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 MAINTAINER RUN CMD COPY | ||
syn keyword dockerfileKeywords EXPOSE ENV ADD ENTRYPOINT | ||
syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD | ||
syn keyword dockerfileKeywords LABEL | ||
|
||
" Bash statements | ||
setlocal iskeyword+=- | ||
syn keyword bashStatement add-apt-repository adduser 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 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 | ||
|
||
" Highlighting | ||
hi link dockerfileKeywords 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" | ||
|
||
set commentstring=#\ %s | ||
|
||
" Enable automatic comment insertion | ||
setlocal fo+=cro |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters