diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/syntax.txt | 15 | ||||
-rw-r--r-- | runtime/syntax/diff.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/help.vim | 7 |
3 files changed, 15 insertions, 13 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 84121be4d6..8cbb958e35 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -243,6 +243,10 @@ Error any erroneous construct Todo anything that needs extra attention; mostly the keywords TODO FIXME and XXX +Added added line in a diff +Changed changed line in a diff +Removed removed line in a diff + The names marked with * are the preferred groups; the others are minor groups. For the preferred groups, the "syntax.vim" file contains default highlighting. The minor groups are linked to the preferred groups, so they get the same @@ -1224,7 +1228,7 @@ To highlight KDE-reserved features, set > g:desktop_enable_kde follows g:desktop_enable_nonstd if not supplied -DIFF *diff.vim* *ft-diff-syntax* +DIFF *diff.vim* The diff highlighting normally finds translated headers. This can be slow if there are very long lines in the file. To disable translations: > @@ -1233,15 +1237,6 @@ there are very long lines in the file. To disable translations: > Also see |diff-slow|. -Since the Vim 9.1 release the diff filetype links the diffAdded, -diffRemoved and diffChanged highlighting groups to |hl-DiffAdd|, -|hl-DiffDelete| and |hl-DiffChange| by default. If you do not want this, you -can change it to the previous groups like this in your |vimrc| > - - hi link diffRemoved Special - hi link diffChanged PreProc - hi link diffAdded Identifier -< DIRCOLORS *dircolors.vim* *ft-dircolors-syntax* The dircolors utility highlighting definition has one option. It exists to diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim index b5c3f5ecbb..b0a8594def 100644 --- a/runtime/syntax/diff.vim +++ b/runtime/syntax/diff.vim @@ -378,9 +378,9 @@ hi def link diffBDiffer Constant hi def link diffIsA Constant hi def link diffNoEOL Constant hi def link diffCommon Constant -hi def link diffRemoved DiffDelete -hi def link diffChanged DiffChange -hi def link diffAdded DiffAdd +hi def link diffRemoved Removed +hi def link diffChanged Changed +hi def link diffAdded Added hi def link diffLine Statement hi def link diffSubname PreProc hi def link diffComment Comment diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index f1e650b2fb..fced5e7dd1 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -136,6 +136,10 @@ syn match helpTodo "\t[* ]Todo\t\+[a-z].*" syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` +syn match helpDiffAdded "\t[* ]Added\t\+[a-z].*" +syn match helpDiffChanged "\t[* ]Changed\t\+[a-z].*" +syn match helpDiffRemoved "\t[* ]Removed\t\+[a-z].*" + " Additionally load a language-specific syntax file "help_ab.vim". let s:i = match(expand("%"), '\.\a\ax$') if s:i > 0 @@ -209,6 +213,9 @@ hi def link helpUnderlined Underlined hi def link helpError Error hi def link helpTodo Todo hi def link helpURL String +hi def link helpDiffAdded Added +hi def link helpDiffChanged Changed +hi def link helpDiffRemoved Removed let b:current_syntax = "help" |