While working a Markdown plugin, we've wanted to change the filetype from
markdown to increase compatibility with other plugins.
To avoid breaking users
.vimrc that had autocommands like:
autocmd FileType mkd echo 'a'
we've tried using:
help 'ft' says both types would be tried.
Now the syntax works fine, but the autocmd does not run. The only way to make it run is to use:
autocmd FileType mkd.markdown echo 'a'
which is obviously bad.
Is there a way to avoid breaking user autocommands in this case?
set ftline? The file: github.com/plasticboy/vim-markdown/blob/master/ftdetect/…
set ft=mkd || set ft=mkd.markdownin ftdetect seems to work, but when I open a markdown file it echos an empty line and requires me to press enter, not sure why. But that is a bit ugly, specially I'd also have to add a
set ft=markdownto make it work for users who update to the new filetype.