Customizable minlines with g:markdown_minlines (#115)

This commit is contained in:
Linda_pp
2017-04-12 12:06:07 +09:00
committed by Tim Pope
parent 3c2215bfed
commit 0b92a7d4cb
2 changed files with 12 additions and 1 deletions

View File

@@ -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.

View File

@@ -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/$!]\@!'