Mercurial > vim
comparison runtime/doc/syntax.txt @ 32916:dcab5385dd02 v9.0.1767
patch 9.0.1767: '.-' no allowed in highlight group names
Commit: https://github.com/vim/vim/commit/d4376dc3ebea91abcb4d9ef9963ef5b968048b78
Author: Gregory Anders <greg@gpanders.com>
Date: Sun Aug 20 19:14:03 2023 +0200
patch 9.0.1767: '.-' no allowed in highlight group names
Problem: '.-' no allowed in highlight group names
Solution: Allow dot and hyphen characters in highlight group names
Allow dots and hyphens in group names. There does not seem
to be any reason for these to be disallowed.
closes: #12807
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 20 Aug 2023 19:30:04 +0200 |
parents | 695b50472e85 |
children | 53bd850dd268 |
comparison
equal
deleted
inserted
replaced
32915:ba87e3f0ffe4 | 32916:dcab5385dd02 |
---|---|
212 | 212 |
213 A syntax group name is to be used for syntax items that match the same kind of | 213 A syntax group name is to be used for syntax items that match the same kind of |
214 thing. These are then linked to a highlight group that specifies the color. | 214 thing. These are then linked to a highlight group that specifies the color. |
215 A syntax group name doesn't specify any color or attributes itself. | 215 A syntax group name doesn't specify any color or attributes itself. |
216 | 216 |
217 The name for a highlight or syntax group must consist of ASCII letters, digits | 217 The name for a highlight or syntax group must consist of ASCII letters, |
218 and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give | 218 digits, underscores, dots, or hyphens. As a regexp: "[a-zA-Z0-9_.-]*". |
219 an error when using other characters. The maximum length of a group name is | 219 However, Vim does not give an error when using other characters. The maximum |
220 about 200 bytes. *E1249* | 220 length of a group name is about 200 bytes. *E1249* |
221 | 221 |
222 To be able to allow each user to pick their favorite set of colors, there must | 222 To be able to allow each user to pick their favorite set of colors, there must |
223 be preferred names for highlight groups that are common for many languages. | 223 be preferred names for highlight groups that are common for many languages. |
224 These are the suggested group names (if syntax highlighting works properly | 224 These are the suggested group names (if syntax highlighting works properly |
225 you can see the actual color, except for "Ignore"): | 225 you can see the actual color, except for "Ignore"): |