diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-24 21:08:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 21:08:21 +0200 |
commit | c545d514dfe1f45f86a54b313082c5171bb0ce1b (patch) | |
tree | 6095614b6795a105c0e1b2bfc7cc00e0754cd951 /runtime | |
parent | 3b2121cedfd7c2710b69bd38a3eb2ce51e0205e4 (diff) | |
parent | 61be343ec8c5e4d504db7ba975b20af2f46ce50d (diff) | |
download | rneovim-c545d514dfe1f45f86a54b313082c5171bb0ce1b.tar.gz rneovim-c545d514dfe1f45f86a54b313082c5171bb0ce1b.tar.bz2 rneovim-c545d514dfe1f45f86a54b313082c5171bb0ce1b.zip |
Merge pull request #19830 from lewis6991/hlgroup_name
feat(highlight)!: error on invalid names and allow '.' and '@'
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/syntax.txt | 10 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index b74611633f..6fcf292513 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -181,16 +181,16 @@ Vim will only load the first syntax file found, assuming that it sets b:current_syntax. -NAMING CONVENTIONS *group-name* *{group-name}* *E669* *W18* +NAMING CONVENTIONS *group-name* *{group-name}* *E669* *E5248* A syntax group name is to be used for syntax items that match the same kind of thing. These are then linked to a highlight group that specifies the color. A syntax group name doesn't specify any color or attributes itself. -The name for a highlight or syntax group must consist of ASCII letters, digits -and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give -an error when using other characters. The maximum length of a group name is -about 200 bytes. *E1249* +The name for a highlight or syntax group must consist of ASCII letters, +digits, underscores, periods and `@` characters. As a regexp it is +`[a-zA-Z0-9_.@]*`. The maximum length of a group name is about 200 bytes. +*E1249* To be able to allow each user to pick their favorite set of colors, there must be preferred names for highlight groups that are common for many languages. diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 53effa1443..0011cd9821 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -390,6 +390,9 @@ Highlight groups: using |n| or |N| |hl-CursorLine| is low-priority unless foreground color is set |hl-VertSplit| superseded by |hl-WinSeparator| + Highlight groups names are allowed to contain the characters `.` and `@`. + It is an error to define a highlight group with a name that doesn't match + the regexp `[a-zA-Z0-9_.@]*` (see |group-name|). Macro/|recording| behavior Replay of a macro recorded during :lmap produces the same actions as when it |