X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e1d8331302bfcd52dc6744a713dab2f79643e182..156e0bfe4e68b01e28aee884bf4e69a34d3e7b1a:/ftplugin/markdown.vim?ds=sidebyside diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index e189ec4..c7fba7f 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -706,9 +706,16 @@ function! s:MarkdownRefreshSyntax(force) endif endfunction +function! s:MarkdownClearSyntaxVariables() + if &filetype == 'markdown' + unlet! b:mkd_included_filetypes + endif +endfunction + augroup Mkd autocmd! au BufWinEnter * call s:MarkdownRefreshSyntax(1) + au BufUnload * call s:MarkdownClearSyntaxVariables() au BufWritePost * call s:MarkdownRefreshSyntax(0) au InsertEnter,InsertLeave * call s:MarkdownRefreshSyntax(0) au CursorHold,CursorHoldI * call s:MarkdownRefreshSyntax(0)