From: Hiroshi Shirosaki Date: Sat, 29 Dec 2018 14:04:53 +0000 (+0900) Subject: Merge pull request #405 from idbrii/setfiletype X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/be76911c18d7d43faa9d18ec69e9d16dba7ada84?hp=52ee2eb68a706972a1840ca036035033046568d6 Merge pull request #405 from idbrii/setfiletype Prevent repeated sourcing of syntax --- diff --git a/ftdetect/markdown.vim b/ftdetect/markdown.vim index 611ecaa..07682da 100644 --- a/ftdetect/markdown.vim +++ b/ftdetect/markdown.vim @@ -1,3 +1,8 @@ +if !has('patch-7.4.480') + " Before this patch, vim used modula2 for .md. + au! filetypedetect BufRead,BufNewFile *.md +endif + " markdown filetype file -au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=markdown -au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx} set filetype=markdown +au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} setfiletype markdown +au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx} setfiletype markdown