vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

Folding error with setext-style headers (includes solution) #1

Closed mavenaut closed 13 years ago

mavenaut commented 13 years ago

Folding was not occurring with setext-style headers.

Change function MarkdownLevel() in ftplugin/pandoc.vim to include

if getline(v:lnum) =~ '^[^-=].\+$' && getline(v:lnum+1) =~ '^=\+$'
    return ">1"
endif

and

if getline(v:lnum) =~ '^[^-=].\+$' && getline(v:lnum+1) =~ '^-\+$'
    return ">2"
endif