Skip to main content
replaced http://vi.stackexchange.com/ with https://vi.stackexchange.com/
Source Link

Inspired by @PeterRincker's answeranswer, I crafted the following to use ATX style headers. Add it to the end of your .vimrc

"# Folding " Fold with ATX style headers - "# is H1, "## is H2, and so on " vim:fdm=expr:fdl=0 " vim:fde=getline(v\:lnum)=~'^"#'?'>'.(matchend(getline(v\:lnum),'"#*')-1)\:'=' 

Inspired by @PeterRincker's answer, I crafted the following to use ATX style headers. Add it to the end of your .vimrc

"# Folding " Fold with ATX style headers - "# is H1, "## is H2, and so on " vim:fdm=expr:fdl=0 " vim:fde=getline(v\:lnum)=~'^"#'?'>'.(matchend(getline(v\:lnum),'"#*')-1)\:'=' 

Inspired by @PeterRincker's answer, I crafted the following to use ATX style headers. Add it to the end of your .vimrc

"# Folding " Fold with ATX style headers - "# is H1, "## is H2, and so on " vim:fdm=expr:fdl=0 " vim:fde=getline(v\:lnum)=~'^"#'?'>'.(matchend(getline(v\:lnum),'"#*')-1)\:'=' 
Source Link
go2null
  • 121
  • 3

Inspired by @PeterRincker's answer, I crafted the following to use ATX style headers. Add it to the end of your .vimrc

"# Folding " Fold with ATX style headers - "# is H1, "## is H2, and so on " vim:fdm=expr:fdl=0 " vim:fde=getline(v\:lnum)=~'^"#'?'>'.(matchend(getline(v\:lnum),'"#*')-1)\:'='