X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f6ffce242a286d5239cf025666fe80af021a7319..da5a7ac96f517e0fd6f886bc3fbe27156ca1f946:/ftplugin/markdown.vim?ds=sidebyside 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()