aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE10
-rw-r--r--README3
-rw-r--r--ftdetect/custodian.vim2
-rw-r--r--syntax/custodian.vim27
4 files changed, 42 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..acb563f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,10 @@
+Copyright (c) 2015, Næþ'n Lasseter
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README b/README
new file mode 100644
index 0000000..17274c4
--- /dev/null
+++ b/README
@@ -0,0 +1,3 @@
+Vim syntax file and filetype detection for Bytemark's Custodian (previously Sentinel) test description files.
+
+See: https://projects.bytemark.co.uk/projects/custodian
diff --git a/ftdetect/custodian.vim b/ftdetect/custodian.vim
new file mode 100644
index 0000000..91ac7bb
--- /dev/null
+++ b/ftdetect/custodian.vim
@@ -0,0 +1,2 @@
+au BufRead,BufNewFile *sentinel-checks.cfg set filetype=custodian
+au BufRead,BufNewFile *custodian.cfg set filetype=custodian
diff --git a/syntax/custodian.vim b/syntax/custodian.vim
new file mode 100644
index 0000000..40503c4
--- /dev/null
+++ b/syntax/custodian.vim
@@ -0,0 +1,27 @@
+" Vim syntax file
+" Language: Sentinel/Custodian
+" Maintaner: Nathan Lasseter
+" Latest Revision: 09 December 2014
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn keyword hostKeywords is are and fetched from
+syn keyword ruleKeywords must run on not otherwise
+
+syn match bytemarkMacros '__\w\+__'
+syn match endStatement '\.\s*$'
+syn match withKeyword 'with\(out\)\?\s\+\w\+'
+syn match comment '#.*$'
+syn match url /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/
+
+let b:current_syntax = "custodian"
+
+hi def link hostKeywords Statement
+hi def link ruleKeywords Statement
+hi def link withKeyword Statement
+hi def link endStatement Statement
+hi def link bytemarkMacros Todo
+hi def link comment Comment
+hi def link url Constant