From 0b92a7d4cbdb64adde33cfa9d3cd3d2f2137f2a4 Mon Sep 17 00:00:00 2001 From: Linda_pp Date: Wed, 12 Apr 2017 12:06:07 +0900 Subject: [PATCH] Customizable minlines with g:markdown_minlines (#115) --- README.markdown | 8 ++++++++ syntax/markdown.vim | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index cd79315..8c7c6d0 100644 --- a/README.markdown +++ b/README.markdown @@ -20,6 +20,14 @@ 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. diff --git a/syntax/markdown.vim b/syntax/markdown.vim index ad925cc..35dd1a3 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -33,7 +33,10 @@ endfor unlet! s:type unlet! s:done_include -syn sync minlines=10 +if !exists('g:markdown_minlines') + let g:markdown_minlines = 50 +endif +execute 'syn sync minlines=' . g:markdown_minlines syn case ignore syn match markdownValid '[<>]\c[a-z/$!]\@!'