annotate runtime/syntax/nroff.vim @ 19091:1c75e1974313 v8.2.0106

patch 8.2.0106: printf formats are not exactly right Commit: https://github.com/vim/vim/commit/b16ad968499aeb29b6ff9be6cc64fb41522a4a5e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 8 22:06:14 2020 +0100 patch 8.2.0106: printf formats are not exactly right Problem: Printf formats are not exactly right. Solution: Adjust signed/unsigned conversions. (Frazer Clews, closes https://github.com/vim/vim/issues/5456)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Jan 2020 22:15:03 +0100
parents 46763b01cd9a
children 5b7ea82bc18f
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 "
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
25 " quit when a syntax file was already loaded
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 "
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
27 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
31 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
32 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
33
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " {{{1 plugin settings...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " {{{2 enable spacing error highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 if exists("nroff_space_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match nroffError /\s\+$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match nroffSpaceError /[.,:;!?]\s\{2,}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " {{{1 Special file settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " {{{2 ms exdented paragraphs are not in the default paragraphs list.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 setlocal paragraphs+=XP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " {{{2 Activate navigation to preporcessor sections.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if exists("b:preprocs_as_sections")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 setlocal sections=EQTSPS[\ G1GS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " {{{1 Escape sequences
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match nroffEscChar /\\[CN]/ nextgroup=nroffEscCharArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match nroffEscape /\\[*fgmnYV]/ nextgroup=nroffEscRegPar,nroffEscRegArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match nroffEscape /\\s[+-]\=/ nextgroup=nroffSize
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match nroffEscape /\\[$AbDhlLRvxXZ]/ nextgroup=nroffEscPar,nroffEscArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match nroffEscRegArg /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match nroffEscRegArg2 /../ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match nroffEscRegPar /(/ contained nextgroup=nroffEscRegArg2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match nroffEscArg /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match nroffEscArg2 /../ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match nroffEscPar /(/ contained nextgroup=nroffEscArg2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match nroffSize /\((\d\)\=\d/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region nroffEscCharArg start=/'/ end=/'/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region nroffEscArg start=/'/ end=/'/ contained contains=nroffEscape,@nroffSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn region nroffEscRegArg matchgroup=nroffEscape start=/\[/ end=/\]/ contained oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region nroffSize matchgroup=nroffEscape start=/\[/ end=/\]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match nroffEscape /\\[adprtu{}]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match nroffEscape /\\$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match nroffEscape /\\\$[@*]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " {{{1 Strings and special characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match nroffSpecialChar /\\[\\eE?!-]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match nroffSpace "\\[&%~|^0)/,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match nroffSpecialChar /\\(../
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 if exists("b:nroff_is_groff")
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 syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\?/ end=/\\?/ oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn cluster nroffSpecial contains=nroffSpecialChar,nroffSpace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn region nroffString start=/"/ end=/"/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region nroffString start=/'/ end=/'/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 " {{{1 Numbers and units
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match nroffNumBlock /[0-9.]\a\=/ contained contains=nroffNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match nroffNumber /\d\+\(\.\d*\)\=/ contained nextgroup=nroffUnit,nroffBadChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match nroffNumber /\.\d\+)/ contained nextgroup=nroffUnit,nroffBadChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match nroffBadChar /./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match nroffUnit /[icpPszmnvMu]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 " {{{1 Requests
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 " Requests begin with . or ' at the beginning of a line, or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " after .if or .ie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn match nroffReqLeader /^[.']/ nextgroup=nroffReqName skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match nroffReqLeader /[.']/ contained nextgroup=nroffReqName skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 " GNU troff allows long request names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 "
829
dc8197342755 updated for version 7.0d04
vimboss
parents: 7
diff changeset
128 syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
829
dc8197342755 updated for version 7.0d04
vimboss
parents: 7
diff changeset
133 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
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " {{{2 Conditional: .if .ie .el
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match nroffReqName /el/ contained nextgroup=nroffReqLeader skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match nroffCond /\S\+/ contained nextgroup=nroffReqLeader skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " {{{2 String definition: .ds .as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn match nroffReqname /[da]s/ contained nextgroup=nroffDefIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn match nroffDefIdent /\S\+/ contained nextgroup=nroffDefinition skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 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
144 syn match nroffDefSpecial /\\$/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn match nroffDefSpecial /\\\((.\)\=./ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 if exists("b:nroff_is_groff")
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 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 " {{{2 Macro definition: .de .am, also diversion: .di
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match nroffReqName /\(d[ei]\|am\)/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn match nroffIdent /[^[?( \t]\+/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match nroffReqName /als/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 " {{{2 Register definition: .rn .rr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 syn match nroffReqName /[rn]r/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 if exists("b:nroff_is_groff")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn match nroffReqName /\(rnn\|aln\)/ contained nextgroup=nroffIdent skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 " {{{1 eqn/tbl/pic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 " <jp>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 " XXX: write proper syntax highlight for eqn / tbl / pic ?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 " <jp />
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 " {{{1 Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn match nroffComment /^'''.*/ contains=nroffTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 if exists("b:nroff_is_groff")
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 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn keyword nroffTodo TODO XXX FIXME contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 " {{{1 Hilighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 " ------------------------------------------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
197 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
200 hi def link nroffEscChar nroffSpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
201 hi def link nroffEscCharAr nroffSpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
202 hi def link nroffSpecialChar SpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
203 hi def link nroffSpace Delimiter
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
204
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
205 hi def link nroffEscRegArg2 nroffEscRegArg
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
206 hi def link nroffEscRegArg nroffIdent
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
208 hi def link nroffEscArg2 nroffEscArg
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
209 hi def link nroffEscPar nroffEscape
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
211 hi def link nroffEscRegPar nroffEscape
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
212 hi def link nroffEscArg nroffEscape
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
213 hi def link nroffSize nroffEscape
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
214 hi def link nroffEscape Preproc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
216 hi def link nroffIgnore Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
217 hi def link nroffComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
218 hi def link nroffTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
220 hi def link nroffReqLeader nroffRequest
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
221 hi def link nroffReqName nroffRequest
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
222 hi def link nroffRequest Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
223 hi def link nroffCond PreCondit
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
224 hi def link nroffDefIdent nroffIdent
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
225 hi def link nroffIdent Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
227 hi def link nroffEquation PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
228 hi def link nroffTable PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
229 hi def link nroffPicture PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
230 hi def link nroffRefer PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
231 hi def link nroffGrap PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
232 hi def link nroffGremlin PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
234 hi def link nroffNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
235 hi def link nroffBadChar nroffError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
236 hi def link nroffSpaceError nroffError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
237 hi def link nroffError Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
239 hi def link nroffPreserve String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
240 hi def link nroffString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
241 hi def link nroffDefinition String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
242 hi def link nroffDefSpecial Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 let b:current_syntax = "nroff"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
247 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 829
diff changeset
248 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 " vim600: set fdm=marker fdl=2: