Open Konfekt opened 4 weeks ago
Here's the relevant code if g:sh_fold_enabled > 3
:
" /usr/share/vim/vim91/syntax/sh.vim (lines 275-277)
ShFoldIfDoFor syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
Any value of
removes lines of (z)sh templates: For example, if
=template=.sh
readsthen
vim .sh
will only show the first line.