Both the original spec on Daring Fireball and the more rigorous
CommonMark spec state that a tab at the beginning of the line is
synonymous with 4 spaces. For the record, I think this was a mistake,
but if you can't beat 'em, join 'em.
Previously in Markdown files, Vim would treat heading syntax in code
fences as Markdown headers. This commit ensures that only headers will
be folded by checking the 'synIDattr' of the item.
E.g. The comment in this code snippet would have been treated as a
Markdown header.
```sh
# This is a comment
echo "Hello world"
```
Addresses an issue metioned in tpope/vim-markdown#10 of adding a
foldtext function.
- Displays == and -- headers as # and ##
- Use markdown header style instead of '+--' to show nesting
Given the example of
This is Header One
==================
This is Header Two
-----------------
### This is Header Three
This is a normal line
Instead of:
+-- 6 lines: This is Header One-----------------------------
+--- 4 lines: This is Header Two----------------------------
+---- 2 lines: ### This is Header Three---------------------
You get:
# This is Header One [6 lines]-------------------------------
## This is Header Two [4 lines]------------------------------
### This is Header Three [2 lines]----------------------------