tpope/vim-markdown — pull request #9 by xolox (2011-11-26 03:31:03+00:00)
Title: Enable concealing of Markdown markers

Hi Tim,

In July 2010 I posted [a Markdown syntax script to vim\_dev] [ann] which used Vim's new [conceal] [conceal] feature to hide all of the text markers in Markdown files. I've been using that script since then and never got any replies so basically forgot about posting it, however recently someone asked me (in the mailing list thread linked above) whether my script was ever included in the Vim runtime.

Of course it was not as I never requested this and your Markdown syntax script is already in the Vim runtime. I've now applied the same principles I used in that script to your `syntax/markdown.vim` script and I'm wondering if you will include these changes so that they will eventually make it into to Vim runtime? Most of the commits in my feature branch enable concealing of one specific kind of text marker. All together they should conceal most of the line noise in Markdown documents.

I've tried to keep the syntax script compatible with Vim 7.2 (without the conceal feature) but unfortunately this requires quite a bit of duplication (as you can see). I haven't found a sane alternative to this duplication.

The concealing is user configurable as explained in the comment at the top of the syntax file (inspired by the same approach in `$VIMRUNTIME/syntax/tex.vim`).

Best regards,

Peter

PS. Here is the Markdown document I used to test that concealing works:

# First level heading

Links with concealed text:

* [indirect link][with_reference].
* [direct link](http://vim.org).
*

## Second level heading

List bullets are replaced by a proper bullet:

* asterisk
+ plus
- minus

Markers for italic and bold text and code fragments are hidden:

* *italic*
* **bold**
* ***bold and italic using asterisks***
* ___bold and italic using underscores___
* `_co*de_`
* `` more ___ code ``

# HTML entities:

* & is the same as `&`
* < is the same as `<`
* > is the same as `>`

[reference]: target

[ann]: http://groups.google.com/group/vim_dev/browse_frm/thread/eb05308417b17a5b/7a876cab0627f699
[conceal]: http://vimdoc.sourceforge.net/htmldoc/version7.html#new-conceal