Vim, by default, opens all .md files as modula2 code. I have never heard of modula2, nor do I plan to use it.How can I tell vim to always treat foo.md as Markdown (as if I had typed :set ft=markdown)?
Open .md files as Markdown
filetype
In the file filetype.vim that is shipped with your distribution you will find a line that looks probably similar to this (on my machine it lives at /usr/share/vim/vim74) :au BufNewFile,BufRead *.md,*.m2,*.mi setf modula2Now, this tells vim to set the filetype as modula2 if your file has such an ending.To override this behaviour you can put a line like this in your own .vimrc (Taken from the Archlinux filetype.vim) :au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md  set ft=markdownEdit:I previously had setf as the function to be called, but it seems to be a reserved function for the filetype.vim file.