From: Hiroshi Shirosaki Date: Thu, 17 Jan 2019 05:24:45 +0000 (+0900) Subject: Merge pull request #397 from sim590/inexact-ft-match-syntax-hl X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/be5e60fa2d85fec3b585411844846678a775a5d3?ds=inline;hp=-c Merge pull request #397 from sim590/inexact-ft-match-syntax-hl ftplugin: syntax highlighting for fts *markdown* --- be5e60fa2d85fec3b585411844846678a775a5d3 diff --combined ftplugin/markdown.vim index 659df91,2c83000..989aef8 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@@ -734,7 -734,7 +734,7 @@@ function! s:MarkdownHighlightSources(fo let include = '@' . toupper(filetype) endif let command = 'syntax region %s matchgroup=%s start="^\s*```\s*%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s' - execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) ? ' concealends' : '') + execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) && get(g:, 'vim_markdown_conceal_code_blocks', 1) ? ' concealends' : '') execute printf('syntax cluster mkdNonListItem add=%s', group) let b:mkd_known_filetypes[ft] = 1 @@@ -768,13 -768,13 +768,13 @@@ endfunctio function! s:MarkdownRefreshSyntax(force) - if &filetype == 'markdown' && line('$') > 1 + if &filetype =~ 'markdown' && line('$') > 1 call s:MarkdownHighlightSources(a:force) endif endfunction function! s:MarkdownClearSyntaxVariables() - if &filetype == 'markdown' + if &filetype =~ 'markdown' unlet! b:mkd_included_filetypes endif endfunction