File: passwd.vim

package info (click to toggle)
vim 2%3A7.4.488-7%2Bdeb8u3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 49,660 kB
  • ctags: 31,441
  • sloc: ansic: 309,686; cpp: 4,068; makefile: 3,283; perl: 1,175; awk: 715; sh: 695; xml: 508; lisp: 501; cs: 458; asm: 114; python: 39; csh: 6
file content (71 lines) | stat: -rw-r--r-- 2,431 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
" Vim syntax file
" Language:         passwd(5) password file
" Maintainer:       Nikolai Weibull <now@bitwi.se>
" Latest Revision:  2006-10-03

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn match   passwdBegin         display '^' nextgroup=passwdAccount

syn match   passwdAccount       contained display '[^:]\+'
                                \ nextgroup=passwdPasswordColon

syn match   passwdPasswordColon contained display ':'
                                \ nextgroup=passwdPassword,passwdShadow

syn match   passwdPassword      contained display '[^:]\+'
                                \ nextgroup=passwdUIDColon

syn match   passwdShadow        contained display '[x*!]'
                                \ nextgroup=passwdUIDColon

syn match   passwdUIDColon      contained display ':' nextgroup=passwdUID

syn match   passwdUID           contained display '\d\{0,10}'
                                \ nextgroup=passwdGIDColon

syn match   passwdGIDColon      contained display ':' nextgroup=passwdGID

syn match   passwdGID           contained display '\d\{0,10}'
                                \ nextgroup=passwdGecosColon

syn match   passwdGecosColon    contained display ':' nextgroup=passwdGecos

syn match   passwdGecos         contained display '[^:]*'
                                \ nextgroup=passwdDirColon

syn match   passwdDirColon      contained display ':' nextgroup=passwdDir

syn match   passwdDir           contained display '/[^:]*'
                                \ nextgroup=passwdShellColon

syn match   passwdShellColon    contained display ':'
                                \ nextgroup=passwdShell

syn match   passwdShell         contained display '.*'

hi def link passwdColon         Normal
hi def link passwdAccount       Identifier
hi def link passwdPasswordColon passwdColon
hi def link passwdPassword      Number
hi def link passwdShadow        Special
hi def link passwdUIDColon      passwdColon
hi def link passwdUID           Number
hi def link passwdGIDColon      passwdColon
hi def link passwdGID           Number
hi def link passwdGecosColon    passwdColon
hi def link passwdGecos         Comment
hi def link passwdDirColon      passwdColon
hi def link passwdDir           Type
hi def link passwdShellColon    passwdColon
hi def link passwdShell         Operator

let b:current_syntax = "passwd"

let &cpo = s:cpo_save
unlet s:cpo_save