I’m looking for something to add to my .vimrc that would tell MacVim to always use Markdown syntax highlighting with TXT files.
Currently, I can do this manually with set filetype=markdown but I have to do that every time I open a file.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can automatically set the filetype for particular file extensions using
autocmd:Add this line to your
.vimrc.Type
:help autocmdwithin vim for more details; see also::help autocmd-group. See also::help filetype.