diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2d7e21cd2f..2589133cf4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3271,7 +3271,7 @@ The g:vimsyn_embed option allows users to select what, if any, types of embedded script highlighting they wish to have. > g:vimsyn_embed == 0 : disable (don't embed any scripts) - g:vimsyn_embed == 'lPr' : support embedded lua, python and ruby + g:vimsyn_embed == 'lpPr' : support embedded lua, perl, python and ruby < This option is disabled by default. *g:vimsyn_folding* @@ -3281,7 +3281,11 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions + g:vimsyn_folding =~ 'h' : fold heredocs + g:vimsyn_folding =~ 'l' : fold lua script + g:vimsyn_folding =~ 'p' : fold perl script g:vimsyn_folding =~ 'P' : fold python script + g:vimsyn_folding =~ 'r' : fold ruby script < *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 4de9cb1425..75292b0445 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -69,7 +69,7 @@ syn case match " Special Vim Highlighting (not automatic) {{{1 " Set up folding commands for this syntax highlighting file {{{2 -if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]' +if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhHlmpPrt]' if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda fold else @@ -85,6 +85,11 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]' else com! -nargs=* VimFoldh endif + if g:vimsyn_folding =~# 'H' + com! -nargs=* VimFoldH fold + else + com! -nargs=* VimFoldH + endif if g:vimsyn_folding =~# 'l' com! -nargs=* VimFoldl fold else @@ -119,6 +124,7 @@ else com! -nargs=* VimFolda com! -nargs=* VimFoldf com! -nargs=* VimFoldh + com! -nargs=* VimFoldH com! -nargs=* VimFoldl com! -nargs=* VimFoldm com! -nargs=* VimFoldp @@ -820,11 +826,11 @@ syn region vimGlobal matchgroup=Statement start='\