aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-17 07:48:42 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-10-17 07:55:55 +0800
commitc89150241d52ac70dd5bf0f4f8cb90902a7ccf6c (patch)
tree4f8ae3cbbf00c7d1bf8f998bf8a4d5139d591ba3 /runtime/syntax
parentde74ed35aff7ce5586a5fcefda415942108eb4ac (diff)
downloadrneovim-c89150241d52ac70dd5bf0f4f8cb90902a7ccf6c.tar.gz
rneovim-c89150241d52ac70dd5bf0f4f8cb90902a7ccf6c.tar.bz2
rneovim-c89150241d52ac70dd5bf0f4f8cb90902a7ccf6c.zip
vim-patch:6c2fc37: runtime(help): Update help syntax
This commit makaes the following changes to the vim help syntax: - fix excessive URL detection in help, because `file:{filename}` in doc/options.txt is determined to be a URL. - update highlighting N for :resize in help - split Italian-specific syntax into separate help script - highlight `Note` in parentheses in help - update 'titlestring' behaviour in documentation for invalid '%' format closes: vim/vim#15883 https://github.com/vim/vim/commit/6c2fc377bfbfb6f1a46b1061413cd21116b596ed Co-authored-by: Milly <milly.ca@gmail.com>
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/help.vim17
-rw-r--r--runtime/syntax/help_it.vim17
2 files changed, 23 insertions, 11 deletions
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index dc892a7d60..c8ad8bfe4a 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -53,6 +53,7 @@ else
syn match helpIgnore "." contained
endif
syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
+syn match helpNote "\c(note\(:\|\>\)"ms=s+1
syn keyword helpWarning WARNING WARNING: Warning:
syn keyword helpDeprecated DEPRECATED DEPRECATED: Deprecated:
syn match helpSpecial "\<N\>"
@@ -65,6 +66,10 @@ syn match helpSpecial "\[N]"
syn match helpSpecial "N N"he=s+1
syn match helpSpecial "Nth"me=e-2
syn match helpSpecial "N-1"me=e-2
+" highlighting N for :resize in windows.txt
+syn match helpSpecial "] -N\>"ms=s+3
+syn match helpSpecial "+N\>"ms=s+1
+syn match helpSpecial "\[+-]N\>"ms=s+4
" highlighting N of cinoptions-values in indent.txt
syn match helpSpecial "^\t-\?\zsNs\?\s"me=s+1
" highlighting N of cinoptions-values in indent.txt
@@ -140,7 +145,7 @@ syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*"
syn match helpError "\t[* ]Error\t\+[a-z].*"
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 helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^'" \t<>{}]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^'" \t<>{}]+)[a-zA-Z0-9/]`
syn match helpDiffAdded "\t[* ]Added\t\+[a-z].*"
syn match helpDiffChanged "\t[* ]Changed\t\+[a-z].*"
@@ -152,16 +157,6 @@ if s:i > 0
exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim"
endif
-" Italian
-if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian"
- syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE:
- syn match helpSpecial "Nma"me=e-2
- syn match helpSpecial "Nme"me=e-2
- syn match helpSpecial "Nmi"me=e-2
- syn match helpSpecial "Nmo"me=e-2
- syn match helpSpecial "\[interv.]"
-endif
-
syn sync minlines=40
diff --git a/runtime/syntax/help_it.vim b/runtime/syntax/help_it.vim
new file mode 100644
index 0000000000..e76851d446
--- /dev/null
+++ b/runtime/syntax/help_it.vim
@@ -0,0 +1,17 @@
+" Vim syntax file
+" Language: Italian Vim program help files *.itx
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2024 Oct 16
+"
+" This script is sourced from syntax/help.vim.
+
+syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE:
+syn match helpNote "\c(nota\(:\|\>\)"ms=s+1
+syn match helpSpecial "Nma"me=e-2
+syn match helpSpecial "Nme"me=e-2
+syn match helpSpecial "Nmi"me=e-2
+syn match helpSpecial "Nmo"me=e-2
+syn match helpSpecial "\[interv.]"
+syn region helpNotVi start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump
+
+" vim: ts=8 sw=2