summaryrefslogtreecommitdiffstats
path: root/syntax/help.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-04 12:11:55 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-04 12:11:55 +0200
commit48f59577c8fa68d85ac73bfd9f257d606c4660b5 (patch)
treee50bd0c7c0c5c76cc6e7cb689cdbdfc7b38bdaab /syntax/help.vim
parent96179c95ba1bc76e792ce06beb7525be1412de48 (diff)
downloadvim-polyglot-48f59577c8fa68d85ac73bfd9f257d606c4660b5.tar.gz
vim-polyglot-48f59577c8fa68d85ac73bfd9f257d606c4660b5.zip
Switch to neovim version of help filetype, fixes #536
Diffstat (limited to '')
-rw-r--r--syntax/help.vim26
1 files changed, 9 insertions, 17 deletions
diff --git a/syntax/help.vim b/syntax/help.vim
index aca620ee..a031e48e 100644
--- a/syntax/help.vim
+++ b/syntax/help.vim
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
-" Last Change: 2020 Jul 28
+" Last Change: 2019 May 12
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -13,7 +13,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)"
+syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1
syn match helpSectionDelim "^===.*===$"
syn match helpSectionDelim "^---.*--$"
if has("conceal")
@@ -21,15 +21,9 @@ if has("conceal")
else
syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
endif
-if has("ebcdic")
- syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar
- syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar
- syn match helpHyperTextEntry "\*[^"*|]\+\*$" contains=helpStar
-else
- syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar
- syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar
- syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar
-endif
+syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar
+syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar
+syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar
if has("conceal")
syn match helpBar contained "|" conceal
syn match helpBacktick contained "`" conceal
@@ -44,6 +38,7 @@ syn match helpNormal "|||"
syn match helpNormal ":|vim:|" " for :help modeline
syn match helpVim "\<Vim version [0-9][0-9.a-z]*"
syn match helpVim "VIM REFERENCE.*"
+syn match helpVim "NVIM REFERENCE.*"
syn match helpOption "'[a-z]\{2,\}'"
syn match helpOption "'t_..'"
syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick
@@ -68,7 +63,7 @@ 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
-syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
+syn match helpSpecial "{[-_a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
syn match helpSpecial "<[-a-zA-Z0-9_]\+>"
syn match helpSpecial "<[SCM]-.>"
@@ -92,15 +87,14 @@ syn match helpSpecial "\[group]"
syn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]"
syn match helpSpecial "CTRL-."
-syn match helpSpecial "CTRL-SHIFT-."
syn match helpSpecial "CTRL-Break"
syn match helpSpecial "CTRL-PageUp"
syn match helpSpecial "CTRL-PageDown"
syn match helpSpecial "CTRL-Insert"
syn match helpSpecial "CTRL-Del"
syn match helpSpecial "CTRL-{char}"
-syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
-syn match helpLeadBlank "^\s\+" contained
+syn match helpSpecial "META-."
+syn match helpSpecial "ALT-."
" Highlight group items in their own color.
syn match helpComment "\t[* ]Comment\t\+[a-z].*"
@@ -154,7 +148,6 @@ if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian"
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
endif
syn sync minlines=40
@@ -175,7 +168,6 @@ hi def link helpVim Identifier
hi def link helpCommand Comment
hi def link helpExample Comment
hi def link helpOption Type
-hi def link helpNotVi Special
hi def link helpSpecial Special
hi def link helpNote Todo
hi def link helpWarning Todo