annotate runtime/syntax/nroff.vim @ 9973:01c3f981ce08 v7.4.2260

commit https://github.com/vim/vim/commit/dd74ab9b464f3d1a5f6f6395469b76f8e0e6dccd Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 26 19:20:26 2016 +0200 patch 7.4.2260 Problem: Channel test is flaky. Solution: Add a newline to separate JSON messages.
author Christian Brabandt <cb@256bit.org>
date Fri, 26 Aug 2016 19:30:05 +0200
parents b7811ab264bf
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " VIM syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: nroff/groff
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
3 " Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
4 " URL: http://vorbote.wordpress.com/
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
5 " Last Change: 2012 Feb 2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " {{{1 Acknowledgements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " ACKNOWLEDGEMENTS:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " creator and maintainer of this syntax file for several years.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " May I be as good at it as he has been.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " {{{1 Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " TODO:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " * Write syntax highlighting files for the preprocessors,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " and integrate with nroff.vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " {{{1 Start syntax highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
34 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
35 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
36
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " {{{1 plugin settings...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " {{{2 enable spacing error highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if exists("nroff_space_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match nroffError /\s\+$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match nroffSpaceError /[.,:;!?]\s\{2,}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " {{{1 Special file settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " {{{2 ms exdented paragraphs are not in the default paragraphs list.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 setlocal paragraphs+=XP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " {{{2 Activate navigation to preporcessor sections.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 if exists("b:preprocs_as_sections")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 setlocal sections=EQTSPS[\ G1GS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " {{{1 Escape sequences
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match nroffEscChar /\\[CN]/ nextgroup=nroffEscCharArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match nroffEscape /\\[*fgmnYV]/ nextgroup=nroffEscRegPar,nroffEscRegArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match nroffEscape /\\s[+-]\=/ nextgroup=nroffSize
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match nroffEscape /\\[$AbDhlLRvxXZ]/ nextgroup=nroffEscPar,nroffEscArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match nroffEscRegArg /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match nroffEscRegArg2 /../ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match nroffEscRegPar /(/ contained nextgroup=nroffEscRegArg2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match nroffEscArg /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match nroffEscArg2 /../ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match nroffEscPar /(/ contained nextgroup=nroffEscArg2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match nroffSize /\((\d\)\=\d/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn region nroffEscCharArg start=/'/ end=/'/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn region nroffEscArg start=/'/ end=/'/ contained contains=nroffEscape,@nroffSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn region nroffEscRegArg matchgroup=nroffEscape start=/\[/ end=/\]/ contained oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region nroffSize matchgroup=nroffEscape start=/\[/ end=/\]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match nroffEscape /\\[adprtu{}]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match nroffEscape /\\$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match nroffEscape /\\\$[@*]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " {{{1 Strings and special characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match nroffSpecialChar /\\[\\eE?!-]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match nroffSpace "\\[&%~|^0)/,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match nroffSpecialChar /\\(../
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match nroffSpecialChar /\\\[[^]]*]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\?/ end=/\\?/ oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\!/ end=/$/ oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn cluster nroffSpecial contains=nroffSpecialChar,nroffSpace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region nroffString start=/"/ end=/"/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region nroffString start=/'/ end=/'/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 " {{{1 Numbers and units
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match nroffNumBlock /[0-9.]\a\=/ contained contains=nroffNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match nroffNumber /\d\+\(\.\d*\)\=/ contained nextgroup=nroffUnit,nroffBadChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match nroffNumber /\.\d\+)/ contained nextgroup=nroffUnit,nroffBadChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match nroffBadChar /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match nroffUnit /[icpPszmnvMu]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " {{{1 Requests
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " Requests begin with . or ' at the beginning of a line, or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " after .if or .ie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn match nroffReqLeader /^[.']/ nextgroup=nroffReqName skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn match nroffReqLeader /[.']/ contained nextgroup=nroffReqName skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 " GNU troff allows long request names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 "
829
dc8197342755 updated for version 7.0d04
vimboss
parents: 7
diff changeset
131 syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
829
dc8197342755 updated for version 7.0d04
vimboss
parents: 7
diff changeset
136 syn region nroffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 " {{{2 Conditional: .if .ie .el
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 syn match nroffReqName /el/ contained nextgroup=nroffReqLeader skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn match nroffCond /\S\+/ contained nextgroup=nroffReqLeader skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 " {{{2 String definition: .ds .as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn match nroffReqname /[da]s/ contained nextgroup=nroffDefIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn match nroffDefIdent /\S\+/ contained nextgroup=nroffDefinition skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 syn region nroffDefinition matchgroup=nroffSpecialChar start=/"/ matchgroup=NONE end=/\\"/me=e-2 skip=/\\$/ start=/\S/ end=/$/ contained contains=nroffDefSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 syn match nroffDefSpecial /\\$/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn match nroffDefSpecial /\\\((.\)\=./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn match nroffDefSpecial /\\\[[^]]*]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 " {{{2 Macro definition: .de .am, also diversion: .di
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match nroffReqName /\(d[ei]\|am\)/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn match nroffIdent /[^[?( \t]\+/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 syn match nroffReqName /als/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 " {{{2 Register definition: .rn .rr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn match nroffReqName /[rn]r/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn match nroffReqName /\(rnn\|aln\)/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 " {{{1 eqn/tbl/pic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 " <jp>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 " XXX: write proper syntax highlight for eqn / tbl / pic ?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 " <jp />
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 " {{{1 Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn match nroffComment /^'''.*/ contains=nroffTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn match nroffComment "\\#.*$" contains=nroffTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 syn keyword nroffTodo TODO XXX FIXME contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 " {{{1 Hilighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 if version >= 508 || !exists("did_nroff_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 let did_nroff_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 HiLink nroffEscChar nroffSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 HiLink nroffEscCharAr nroffSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 HiLink nroffSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 HiLink nroffSpace Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 HiLink nroffEscRegArg2 nroffEscRegArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink nroffEscRegArg nroffIdent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 HiLink nroffEscArg2 nroffEscArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 HiLink nroffEscPar nroffEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink nroffEscRegPar nroffEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 HiLink nroffEscArg nroffEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 HiLink nroffSize nroffEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 HiLink nroffEscape Preproc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 HiLink nroffIgnore Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 HiLink nroffComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 HiLink nroffTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 HiLink nroffReqLeader nroffRequest
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 HiLink nroffReqName nroffRequest
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 HiLink nroffRequest Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 HiLink nroffCond PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 HiLink nroffDefIdent nroffIdent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 HiLink nroffIdent Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 HiLink nroffEquation PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 HiLink nroffTable PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 HiLink nroffPicture PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 HiLink nroffRefer PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 HiLink nroffGrap PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 HiLink nroffGremlin PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 HiLink nroffNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 HiLink nroffBadChar nroffError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 HiLink nroffSpaceError nroffError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 HiLink nroffError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 HiLink nroffPreserve String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 HiLink nroffString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 HiLink nroffDefinition String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 HiLink nroffDefSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 let b:current_syntax = "nroff"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
262 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
263 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 " vim600: set fdm=marker fdl=2: