From: David Briscoe Date: Fri, 7 Dec 2018 00:45:35 +0000 (-0800) Subject: Prevent repeated sourcing of syntax X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/da145debf80da5f38e244d2f968d43f5051590f1?hp=da145debf80da5f38e244d2f968d43f5051590f1 Prevent repeated sourcing of syntax Bug: Using `vim --startuptime ~/time.log name.md` would show multiple sourcing of syntax/markdown.vim indicating unnecessary startup cost. Cause: As of vim/vim@7d76c804af900ba6dcc4b1e45373ccab3418c6b2, vim uses .md for markdown instead of modula2. Since vim-markdown was using `set filetype`, it was sourcing the files a second time after vim's runtime files had already set the filetype. Resolution: Using `setfiletype` prevents this double sourcing. To remain backwards compatible, we remove the .md filetype detection for modula2 on old versions. Related to sheerun/vim-polyglot#290. Tested .md ftdetection with vim 7.4.052 and 8.1.527. ---