diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2017-01-04 07:53:59 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-03 23:53:59 +0100 |
commit | 9cb31ecdb0308ef26c57ca95cd5b4f1d48b1750d (patch) | |
tree | 3a258f6758196176c568d87ae73131aeb6e38c51 /runtime/syntax | |
parent | 3b793d045388d9ff7f8ab3efdccf60ddab336b88 (diff) | |
download | rneovim-9cb31ecdb0308ef26c57ca95cd5b4f1d48b1750d.tar.gz rneovim-9cb31ecdb0308ef26c57ca95cd5b4f1d48b1750d.tar.bz2 rneovim-9cb31ecdb0308ef26c57ca95cd5b4f1d48b1750d.zip |
syntax/ruby.vim, perl.vim: Preserve 'foldmethod'. (#5858)
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/vim.vim | 4 |
1 files changed, 4 insertions, 0 deletions
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 |