blob: ae5bfd8553cf080833be2293143c52a20a36c30e [file] [log] [blame]
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00001" Vim syntax file
2" Language: group(5) user group file
Bram Moolenaar57657d82006-04-21 22:12:41 +00003" Maintainer: Nikolai Weibull <now@bitwi.se>
4" Latest Revision: 2006-04-19
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00005
6if exists("b:current_syntax")
7 finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn match groupBegin display '^' nextgroup=groupName
14
15syn match groupName contained display '[a-z_][a-z0-9_-]\{0,15}'
16 \ nextgroup=groupPasswordColon
17
18syn match groupPasswordColon contained display ':'
19 \ nextgroup=groupPassword,groupShadow
20
21syn match groupPassword contained display '[^:]*'
22 \ nextgroup=groupGIDColon
23
24syn match groupShadow contained display '[x*]' nextgroup=groupGIDColon
25
26syn match groupGIDColon contained display ':' nextgroup=groupGID
27
Bram Moolenaar57657d82006-04-21 22:12:41 +000028syn match groupGID contained display '\d*'
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000029 \ nextgroup=groupUserListColon
30
31syn match groupUserListColon contained display ':' nextgroup=groupUserList
32
33syn match groupUserList contained '[a-z_][a-z0-9_-]*'
34 \ nextgroup=groupUserListSep
35
36syn match groupUserListSep contained display ',' nextgroup=groupUserList
37
38hi def link groupDelimiter Normal
39hi def link groupName Identifier
40hi def link groupPasswordColon groupDelimiter
41hi def link groupPassword Number
42hi def link groupShadow Special
43hi def link groupGIDColon groupDelimiter
44hi def link groupGID Number
45hi def link groupUserListColon groupDelimiter
46hi def link groupUserList Identifier
47hi def link groupUserListSep groupDelimiter
48
49let b:current_syntax = "group"
50
51let &cpo = s:cpo_save
52unlet s:cpo_save