Zach Himsel f08447c76b Fix region detection for indented code blocks
Prior to this commit, _any_ line that started with at least 4 spaces or
a tab would be considered a code block.

For example, the third level of a 2-space-indented list would be
highlighted as code, not as list items.

Note: this conforms to the original Markdown spec:
> To produce a code block in Markdown, simply indent every line of the
> block by at least 4 spaces or 1 tab.
> A code block continues until it reaches a line that is not indented
> (or the end of the article).

While this doesn't explicitly state that a blank line _before_ the code
block is required, in practical testing, it is. As such, I've included
the requirement of a blank line preceeding the indent to match the
region start.

Any line not indented by at least 4 spaces will end the region.

Closes https://github.com/tpope/vim-markdown/issues/81
Closes https://github.com/tpope/vim-markdown/issues/164
Closes https://github.com/tpope/vim-markdown/issues/94 (possibly)
Closes https://github.com/tpope/vim-markdown/pull/140
2021-03-10 15:30:11 -05:00
2019-11-12 19:30:03 -05:00
2018-02-04 23:47:43 -05:00

Vim Markdown runtime files

This is the development version of Vim's included syntax highlighting and filetype plugins for Markdown. Generally you don't need to install these if you are running a recent version of Vim.

If you want to enable fenced code block syntax highlighting in your markdown documents you can enable it in your .vimrc like so:

let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']

To disable markdown syntax concealing add the following to your vimrc:

let g:markdown_syntax_conceal = 0

Syntax highlight is synchronized in 50 lines. It may cause collapsed highlighting at large fenced code block. In the case, please set larger value in your vimrc:

let g:markdown_minlines = 100

Note that setting too large value may cause bad performance on highlighting.

License

Copyright © Tim Pope. Distributed under the same terms as Vim itself. See :help license.

Description
Vim Markdown runtime files
Readme 385 KiB
Languages
Vim Script 100%