robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ab20681c52
master
1" Vim syntax file 2" Language: trustees 3" Maintainer: Nima Talebi <nima@it.net.au> 4" Last Change: 2022 Jun 14 5 6" quit when a syntax file was already loaded 7if exists ( "b:current_syntax" ) 8finish 9endif 10 11syntax case match 12syntax sync minlines= 0 maxlines=0 13 14" Errors & Comments 15syntax match tfsError /. * / 16highlight link tfsError Error 17syntax keyword tfsSpecialComment TODO XXX FIXME contained 18highlight link tfsSpecialComment Todo 19syntax match tfsComment ~\s * #. * ~contains = tfsSpecialComment 20highlight link tfsComment Comment 21 22" Operators & Delimiters 23highlight link tfsSpecialChar Operator 24syntax match tfsSpecialChar ~[ *!+ ] ~contained 25highlight link tfsDelimiter Delimiter 26syntax match tfsDelimiter ~: ~contained 27 28" Trustees Rules - Part 1 of 3 - The Device 29syntax region tfsRuleDevice matchgroup = tfsDeviceContainer start = ~\[/ ~end = ~\] ~nextgroup = tfsRulePath oneline 30highlight link tfsRuleDevice Label 31highlight link tfsDeviceContainer PreProc 32 33" Trustees Rules - Part 2 of 3 - The Path 34syntax match tfsRulePath ~/ [ -_a-zA-Z0-9/ ] * ~nextgroup = tfsRuleACL contained contains = tfsDelimiter 35highlight link tfsRulePath String 36 37" Trustees Rules - Part 3 of 3 - The ACLs 38syntax match tfsRuleACL ~\(:\(\*\| [ + ] \{0,1\} [ a-zA-Z0-9/ ] \+\): [ RWEBXODCU! ] \+\)\+$ ~contained contains = tfsDelimiter , tfsRuleWho , tfsRuleWhat 39syntax match tfsRuleWho ~\(\*\| [ + ] \{0,1\} [ a-zA-Z0-9/ ] \+\) ~contained contains = tfsSpecialChar 40highlight link tfsRuleWho Identifier 41syntax match tfsRuleWhat ~[ RWEBXODCU! ] \+ ~contained contains = tfsSpecialChar 42highlight link tfsRuleWhat Structure 43 44let b: current_syntax = 'trustees'