X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7f17091c09ab1daa4866fa94a8d646b9e3641c1a..d0ed42073e25a1c98f9098c80f5daa90ac827193:/ftplugin/markdown.vim diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 659df91..200293e 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -768,18 +768,20 @@ endfunction 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 augroup Mkd + " These autocmd calling s:MarkdownRefreshSyntax need to be kept in sync with + " the autocmds calling s:MarkdownSetupFolding in after/ftplugin/markdown.vim. autocmd! * autocmd BufWinEnter call s:MarkdownRefreshSyntax(1) autocmd BufUnload call s:MarkdownClearSyntaxVariables()