]> git.madduck.net Git - etc/vim.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Prevent repeated sourcing of syntax
authorDavid Briscoe <idbrii@gmail.com>
Fri, 7 Dec 2018 00:45:35 +0000 (16:45 -0800)
committerDavid Briscoe <idbrii@gmail.com>
Fri, 7 Dec 2018 17:36:16 +0000 (09:36 -0800)
commitda145debf80da5f38e244d2f968d43f5051590f1
tree12e9715c793524926023fc1978782beb1a56f453
parent52ee2eb68a706972a1840ca036035033046568d6
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.
ftdetect/markdown.vim