Enabling markdown syntax for .md files in MacVim

Find where you installed it, in my case it was as below because I installed it with Homebrew:

/usr/local/Cellar/macvim/7.3-64/MacVim.app

Edit this file:

/Contents/Resources/vim/runtime/filetype.vim

Remove “.md” from the lines below:

Modula 2
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.md,*.mi setf modula2

Search for the following:

au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,README.md setf markdown

Add the below near the end of line, directly after “README.md”

*.md

Restart MacVim and you’ll be good to go.



#MacVim #markdown #vim