patch 9.1.1568: need a few more default highlight groups
Commit:
https://github.com/vim/vim/commit/16f7098e68951ce421512c34d03810bdd1efbaed
Author: Maxim Kim <[email protected]>
Date: Sun Jul 20 09:32:11 2025 +0200
patch 9.1.1568: need a few more default highlight groups
Problem: need a few more default highlight groups
Solution: Add Bold, Italic and BoldItalic default highlight groups
(Maxim Kim).
related: https://github.com/vim/vim/pull/17598#issuecomment-3007320523
closes: #17804
Signed-off-by: Maxim Kim <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index b1f644e5b..fd5c421fe 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 14
+*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -262,6 +262,9 @@ you can see the actual color, except for "Ignore"):
Debug debugging statements
*Underlined text that stands out, HTML links
+ *Bold bold text
+ *Italic italic text
+ *BoldItalic bold and italic text
*Ignore left blank, hidden |hl-Ignore|
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 1dd1576ac..b49b86a2b 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1. Last change: 2025 Jul 16
+*version9.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41640,6 +41640,9 @@ Other new features ~
- The new digraph "APPROACHES THE LIMIT" using ".=" has been added.
+- Add the new default highlighting groups "Bold", "Italic" and "BoldItalic"
+ for use in syntax scripts.
+
*changed-9.2*
Changed~
-------
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index 5917e565a..bd238376f 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <[email protected]>
-" Last Change: 2025 Jul 12
+" Last Change: 2025 Jul 20
" Former Maintainer: Bram Moolenaar <[email protected]>
" Quit when a (custom) syntax file was already loaded
@@ -179,6 +179,9 @@ syn match helpDelimiter " [* ]Delimiter
\+[a-z].*"
syn match helpSpecialComment " [* ]SpecialComment \+[a-z].*"
syn match helpDebug " [* ]Debug \+[a-z].*"
syn match helpUnderlined " [* ]Underlined \+[a-z].*"
+syn match helpBold " [* ]Bold \+[a-z].*"
+syn match helpItalic " [* ]Italic \+[a-z].*"
+syn match helpBoldItalic " [* ]BoldItalic \+[a-z].*"
syn match helpError " [* ]Error \+[a-z].*"
syn match helpTodo " [* ]Todo \+[a-z].*"
@@ -250,6 +253,9 @@ hi def link helpDelimiter Delimiter
hi def link helpSpecialComment SpecialComment
hi def link helpDebug Debug
hi def link helpUnderlined Underlined
+hi def link helpBold Bold
+hi def link helpItalic Italic
+hi def link helpBoldItalic BoldItalic
hi def link helpError Error
hi def link helpTodo Todo
hi def link helpURL String
diff --git a/runtime/syntax/syncolor.vim b/runtime/syntax/syncolor.vim
index 52b3a0b60..8b0beb88d 100644
--- a/runtime/syntax/syncolor.vim
+++ b/runtime/syntax/syncolor.vim
@@ -62,6 +62,9 @@ else
endif
SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red
gui=NONE guifg=White guibg=Red
SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow
gui=NONE guifg=Blue guibg=Yellow
+SynColor Bold term=bold cterm=bold ctermfg=NONE ctermbg=NONE gui=bold
guifg=NONE guibg=NONE
+SynColor Italic term=italic cterm=italic ctermfg=NONE
ctermbg=NONE gui=italic guifg=NONE guibg=NONE
+SynColor BoldItalic term=bold,italic cterm=bold,italic ctermfg=NONE
ctermbg=NONE gui=bold,italic guifg=NONE guibg=NONE
" Common groups that link to default highlighting.
" You can specify other highlighting easily.
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index 0374077bd..e4d46911d 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -191,14 +191,14 @@ func Test_syntax_completion()
" Check that clearing "Aap" avoids it showing up before Boolean.
hi Aap ctermfg=blue
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
- call assert_match('^"syn list Aap Added Boolean Changed Character ', @:)
+ call assert_match('^"syn list Aap Added Bold BoldItalic Boolean Changed
Character ', @:)
hi clear Aap
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
- call assert_match('^"syn list Added Boolean Changed Character ', @:)
+ call assert_match('^"syn list Added Bold BoldItalic Boolean Changed
Character ', @:)
call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
- call assert_match('^"syn match Added Boolean Changed Character ', @:)
+ call assert_match('^"syn match Added Bold BoldItalic Boolean Changed
Character ', @:)
syn cluster Aax contains=Aap
call feedkeys(":syn list @A\<C-A>\<C-B>\"\<CR>", 'tx')
diff --git a/src/version.c b/src/version.c
index 3b3f8ac97..62f61e4a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1568,
/**/
1567,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1udOjI-00Gksi-85%40256bit.org.