mzlogin / vim-markdown-toc

A vim 7.4+ plugin to generate table of contents for Markdown files.
http://www.vim.org/scripts/script.php?script_id=5460
MIT License
609 stars 59 forks source link

Remove filetype detection #90

Closed AndrewRadev closed 4 weeks ago

AndrewRadev commented 4 weeks ago

Vim has built-in markdown filetype detection, so adding au BufRead,BufNewFile sets the filetype for a second time, evaluating indent, syntax, etc, which can make loading markdown files very slow.

An alternative might be to use setfiletype instead (:help :setfiletype) to make sure it only gets set once, but in general, I don't think a plugin that adds functionality to a markdown file should need to set the filetype itself.

mzlogin commented 4 weeks ago

OK, thanks a lot.