A piece of code for code folding

  question, vim

An existing folding code:

set fdm=expr
 set foldexpr=Myindent(v:lnum)
 func!  Myindent(lnum)
 let s:a=strlen(matchstr(getline(v:lnum), '^\*\+\s\+\|^\d\(\.\d\)\=\s\+'))
 if s:a == 4
 return '>2'
 elseif s:a == 2
 return '>1'
 else
 return '='
 endif
 endf

Text before collapse:
请输入图片描述

Existing folding effect:

请输入图片描述

My needs:

  1. As shown in the following figure, how to remove the redundant parts in front? It will look fresher if it is removed.
  2. I have just started to contact Vim and hope everyone can give me some advice.

请输入图片描述

:help fold-foldtext