aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/help.vim2
-rw-r--r--runtime/syntax/vim.vim4
2 files changed, 5 insertions, 1 deletions
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index b3c7f2a63e..41bb0b1938 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -59,7 +59,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]-.>"
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index cd96a55eda..63618e902e 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -637,7 +637,9 @@ if !filereadable(s:perlpath)
endif
if g:vimsyn_embed =~# 'p' && filereadable(s:perlpath)
unlet! b:current_syntax
+ let s:foldmethod = &l:foldmethod
exe "syn include @vimPerlScript ".s:perlpath
+ let &l:foldmethod = s:foldmethod
VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript
VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
syn cluster vimFuncBodyList add=vimPerlRegion
@@ -659,7 +661,9 @@ if !filereadable(s:rubypath)
endif
if g:vimsyn_embed =~# 'r' && filereadable(s:rubypath)
unlet! b:current_syntax
+ let s:foldmethod = &l:foldmethod
exe "syn include @vimRubyScript ".s:rubypath
+ let &l:foldmethod = s:foldmethod
VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript
syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
syn cluster vimFuncBodyList add=vimRubyRegion