Level 1 heading which is served as a document title is not folded.
`g:vim_markdown_folding_level` setting is not active with this fold style.
+To prevent foldtext from being set add the following to your `.vimrc`:
+
+```vim
+let g:vim_markdown_override_foldtext = 0
+```
+
### Set header folding level
Folding level is a number between 1 and 6. By default, if not specified, it is set to 1.
Concealing is set for some syntax.
For example, conceal `[link text](link url)` as just `link text`.
+ Also, `_italic_` and `*italic*` will conceal to just _italic_.
+ Similarly `__bold__`, `**bold**`, `___italic bold___`, and `***italic bold***`
+ will conceal to just __bold__, **bold**, ___italic bold___, and ***italic bold*** respectively.
To enable conceal use Vim's standard conceal configuration.
Level 1 heading which is served as a document title is not folded.
'g:vim_markdown_folding_level' setting is not active with this fold style.
+To prevent foldtext from being overridden, add the following to your '.vimrc':
+
+ let g:vim_markdown_override_foldtext = 0
+
-------------------------------------------------------------------------------
*vim-markdown-set-header-folding-level*
Set header folding level ~
Concealing is set for some syntax.
For example, conceal '[link text](link url)' as just 'link text'.
+ Also, '_italic_' and '*italic*' will conceal to just 'italic'.
+ Similarly '__bold__', '**bold**', '___italic bold___', and '***italic bold***'
+ will conceal to 'bold', 'bold', 'italic bold', and 'italic bold' respectively.
To enable conceal use Vim's standard conceal configuration.
>
else
let s:oneline = ' oneline'
endif
- execute 'syn region htmlItalic start="\%(^\|\s\)\zs\*\ze[^\\\*\t ]\%(\%([^*]\|\\\*\|\n\)*[^\\\*\t ]\)\?\*\_W" end="[^\\\*\t ]\zs\*\ze\_W" keepend' . s:oneline
- execute 'syn region htmlItalic start="\%(^\|\s\)\zs_\ze[^\\_\t ]" end="[^\\_\t ]\zs_\ze\_W" keepend' . s:oneline
- execute 'syn region htmlBold start="\%(^\|\s\)\*\*\ze\S" end="\S\zs\*\*" keepend' . s:oneline
- execute 'syn region htmlBold start="\%(^\|\s\)\zs__\ze\S" end="\S\zs__" keepend' . s:oneline
- execute 'syn region htmlBoldItalic start="\%(^\|\s\)\zs\*\*\*\ze\S" end="\S\zs\*\*\*" keepend' . s:oneline
- execute 'syn region htmlBoldItalic start="\%(^\|\s\)\zs___\ze\S" end="\S\zs___" keepend' . s:oneline
+ syn region mkdItalic matchgroup=mkdItalic start="\%(\*\|_\)" end="\%(\*\|_\)"
+ syn region mkdBold matchgroup=mkdBold start="\%(\*\*\|__\)" end="\%(\*\*\|__\)"
+ syn region mkdBoldItalic matchgroup=mkdBoldItalic start="\%(\*\*\*\|___\)" end="\%(\*\*\*\|___\)"
+ execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs\*\ze[^\\\*\t ]\%(\%([^*]\|\\\*\|\n\)*[^\\\*\t ]\)\?\*\_W" end="[^\\\*\t ]\zs\*\ze\_W" keepend' . s:oneline . s:concealends
+ execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs_\ze[^\\_\t ]" end="[^\\_\t ]\zs_\ze\_W" keepend' . s:oneline . s:concealends
+ execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs\*\*\ze\S" end="\S\zs\*\*" keepend' . s:oneline . s:concealends
+ execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs__\ze\S" end="\S\zs__" keepend' . s:oneline . s:concealends
+ execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs\*\*\*\ze\S" end="\S\zs\*\*\*" keepend' . s:oneline . s:concealends
+ execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs___\ze\S" end="\S\zs___" keepend' . s:oneline . s:concealends
" [link](URL) | [link][id] | [link][] | ![image](URL)
syn region mkdFootnotes matchgroup=mkdDelimiter start="\[^" end="\]"
syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained
-syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\s\+/ contained
+syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\ze\s\+/ contained
syn region mkdListItemLine start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" oneline contains=@mkdNonListItem,mkdListItem,@Spell
syn region mkdNonListItemBlock start="\(\%^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@!\|\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!\)" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell
syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/