Imported Upstream version 8.0.586
[platform/upstream/vim.git] / runtime / syntax / manconf.vim
1 " Vim syntax file
2 " Language:             man.conf(5) - man configuration file
3 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:      2006-04-19
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 keyword manconfTodo         contained TODO FIXME XXX NOTE
14
15 syn region  manconfComment      display oneline start='^#' end='$'
16                                 \ contains=manconfTodo,@Spell
17
18 if !has("win32") && $OSTYPE =~   'bsd'
19   syn match   manconfBegin      display '^'
20                                 \ nextgroup=manconfKeyword,manconfSection,
21                                 \ manconfComment skipwhite
22
23   syn keyword manconfKeyword    contained _build _crunch
24                                 \ nextgroup=manconfExtCmd skipwhite
25
26   syn keyword manconfKeyword    contained _suffix
27                                 \ nextgroup=manconfExt skipwhite
28
29   syn keyword manconfKeyword    contained _crunch
30
31   syn keyword manconfKeyword    contained _subdir _version _whatdb
32                                 \ nextgroup=manconfPaths skipwhite
33
34   syn match   manconfExtCmd     contained display '\.\S\+'
35                                 \ nextgroup=manconfPaths skipwhite
36
37   syn match   manconfSection    contained '[^#_ \t]\S*'
38                                 \ nextgroup=manconfPaths skipwhite
39
40   syn keyword manconfSection    contained _default
41                                 \ nextgroup=manconfPaths skipwhite
42
43   syn match   manconfPaths      contained display '\S\+'
44                                 \ nextgroup=manconfPaths skipwhite
45
46   syn match   manconfExt        contained display '\.\S\+'
47
48   hi def link manconfExtCmd     Type
49   hi def link manconfSection    Identifier
50   hi def link manconfPaths      String
51 else
52   syn match   manconfBegin      display '^'
53                                 \ nextgroup=manconfBoolean,manconfKeyword,
54                                 \ manconfDecompress,manconfComment skipwhite
55
56   syn keyword manconfBoolean    contained FSSTND FHS NOAUTOPATH NOCACHE
57
58   syn keyword manconfKeyword    contained MANBIN
59                                 \ nextgroup=manconfPath skipwhite
60
61   syn keyword manconfKeyword    contained MANPATH MANPATH_MAP
62                                 \ nextgroup=manconfFirstPath skipwhite
63
64   syn keyword manconfKeyword    contained APROPOS WHATIS TROFF NROFF JNROFF EQN
65                                 \ NEQN JNEQN TBL COL REFER PIC VGRIND GRAP
66                                 \ PAGER BROWSER HTMLPAGER CMP CAT COMPRESS
67                                 \ DECOMPRESS MANDEFOPTIONS
68                                 \ nextgroup=manconfCommand skipwhite
69
70   syn keyword manconfKeyword    contained COMPRESS_EXT
71                                 \ nextgroup=manconfExt skipwhite
72
73   syn keyword manconfKeyword    contained MANSECT
74                                 \ nextgroup=manconfManSect skipwhite
75
76   syn match   manconfPath       contained display '\S\+'
77
78   syn match   manconfFirstPath  contained display '\S\+'
79                                 \ nextgroup=manconfSecondPath skipwhite
80
81   syn match   manconfSecondPath contained display '\S\+'
82
83   syn match   manconfCommand    contained display '\%(/[^/ \t]\+\)\+'
84                                 \ nextgroup=manconfCommandOpt skipwhite
85
86   syn match   manconfCommandOpt contained display '\S\+'
87                                 \ nextgroup=manconfCommandOpt skipwhite
88
89   syn match   manconfExt        contained display '\.\S\+'
90
91   syn match   manconfManSect    contained '[^:]\+' nextgroup=manconfManSectSep
92
93   syn match   manconfManSectSep contained ':' nextgroup=manconfManSect
94
95   syn match   manconfDecompress contained '\.\S\+'
96                                 \ nextgroup=manconfCommand skipwhite
97
98   hi def link manconfBoolean    Boolean
99   hi def link manconfPath       String
100   hi def link manconfFirstPath  manconfPath
101   hi def link manconfSecondPath manconfPath
102   hi def link manconfCommand    String
103   hi def link manconfCommandOpt Special
104   hi def link manconfManSect    Identifier
105   hi def link manconfManSectSep Delimiter
106   hi def link manconfDecompress Type
107 endif
108
109 hi def link manconfTodo         Todo
110 hi def link manconfComment      Comment
111 hi def link manconfKeyword      Keyword
112 hi def link manconfExt          Type
113
114 let b:current_syntax = "manconf"
115
116 let &cpo = s:cpo_save
117 unlet s:cpo_save