From 8fe1dac7fc768e2bcbfe1bfce2696cc09ff1fbd3 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Tue, 25 Aug 2015 11:59:03 +0100 Subject: Initial commit --- LICENSE | 10 ++++++++++ README | 3 +++ ftdetect/custodian.vim | 2 ++ syntax/custodian.vim | 27 +++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 LICENSE create mode 100644 README create mode 100644 ftdetect/custodian.vim create mode 100644 syntax/custodian.vim 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 -- cgit v1.2.3