389
|
1 " Vim syntax file
|
11062
|
2 " Language: passwd(5) password file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-10-03
|
389
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn match passwdBegin display '^' nextgroup=passwdAccount
|
|
14
|
1208
|
15 syn match passwdAccount contained display '[^:]\+'
|
389
|
16 \ nextgroup=passwdPasswordColon
|
|
17
|
|
18 syn match passwdPasswordColon contained display ':'
|
|
19 \ nextgroup=passwdPassword,passwdShadow
|
|
20
|
|
21 syn match passwdPassword contained display '[^:]\+'
|
|
22 \ nextgroup=passwdUIDColon
|
|
23
|
|
24 syn match passwdShadow contained display '[x*!]'
|
|
25 \ nextgroup=passwdUIDColon
|
|
26
|
|
27 syn match passwdUIDColon contained display ':' nextgroup=passwdUID
|
|
28
|
1208
|
29 syn match passwdUID contained display '\d\{0,10}'
|
389
|
30 \ nextgroup=passwdGIDColon
|
|
31
|
|
32 syn match passwdGIDColon contained display ':' nextgroup=passwdGID
|
|
33
|
1208
|
34 syn match passwdGID contained display '\d\{0,10}'
|
389
|
35 \ nextgroup=passwdGecosColon
|
|
36
|
|
37 syn match passwdGecosColon contained display ':' nextgroup=passwdGecos
|
|
38
|
|
39 syn match passwdGecos contained display '[^:]*'
|
|
40 \ nextgroup=passwdDirColon
|
|
41
|
|
42 syn match passwdDirColon contained display ':' nextgroup=passwdDir
|
|
43
|
|
44 syn match passwdDir contained display '/[^:]*'
|
|
45 \ nextgroup=passwdShellColon
|
|
46
|
|
47 syn match passwdShellColon contained display ':'
|
|
48 \ nextgroup=passwdShell
|
|
49
|
839
|
50 syn match passwdShell contained display '.*'
|
389
|
51
|
|
52 hi def link passwdColon Normal
|
|
53 hi def link passwdAccount Identifier
|
|
54 hi def link passwdPasswordColon passwdColon
|
|
55 hi def link passwdPassword Number
|
|
56 hi def link passwdShadow Special
|
|
57 hi def link passwdUIDColon passwdColon
|
|
58 hi def link passwdUID Number
|
|
59 hi def link passwdGIDColon passwdColon
|
|
60 hi def link passwdGID Number
|
|
61 hi def link passwdGecosColon passwdColon
|
|
62 hi def link passwdGecos Comment
|
|
63 hi def link passwdDirColon passwdColon
|
|
64 hi def link passwdDir Type
|
|
65 hi def link passwdShellColon passwdColon
|
|
66 hi def link passwdShell Operator
|
|
67
|
|
68 let b:current_syntax = "passwd"
|
|
69
|
|
70 let &cpo = s:cpo_save
|
|
71 unlet s:cpo_save
|