aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/help.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/help.vim')
-rw-r--r--runtime/syntax/help.vim16
1 files changed, 13 insertions, 3 deletions
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index d133c6a804..db5ad3728c 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
-" Last Change: 2014 Feb 12
+" Last Change: 2017 Oct 19
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -36,11 +36,11 @@ 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\."
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
+syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
if has("conceal")
@@ -49,16 +49,19 @@ else
syn match helpIgnore "." contained
endif
syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
+syn keyword helpWarning WARNING WARNING: Warning:
+syn keyword helpDeprecated DEPRECATED DEPRECATED: Deprecated:
syn match helpSpecial "\<N\>"
syn match helpSpecial "\<N\.$"me=e-1
syn match helpSpecial "\<N\.\s"me=e-2
syn match helpSpecial "(N\>"ms=s+1
+
syn match helpSpecial "\[N]"
" avoid highlighting N N in help.txt
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]-.>"
@@ -78,6 +81,9 @@ syn match helpSpecial "\[arguments]"
syn match helpSpecial "\[ident]"
syn match helpSpecial "\[addr]"
syn match helpSpecial "\[group]"
+" Don't highlight [converted] and others that do not have a tag
+syn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]"
+
syn match helpSpecial "CTRL-."
syn match helpSpecial "CTRL-Break"
syn match helpSpecial "CTRL-PageUp"
@@ -85,6 +91,8 @@ syn match helpSpecial "CTRL-PageDown"
syn match helpSpecial "CTRL-Insert"
syn match helpSpecial "CTRL-Del"
syn match helpSpecial "CTRL-{char}"
+syn match helpSpecial "META-."
+syn match helpSpecial "ALT-."
" Highlight group items in their own color.
syn match helpComment "\t[* ]Comment\t\+[a-z].*"
@@ -160,6 +168,8 @@ hi def link helpExample Comment
hi def link helpOption Type
hi def link helpSpecial Special
hi def link helpNote Todo
+hi def link helpWarning Todo
+hi def link helpDeprecated Todo
hi def link helpComment Comment
hi def link helpConstant Constant