How do I set up a default syntax for files that have no extension in vim?
Share
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.
One way would be to add an autocommand to your
.vimrcfor files that don’t have the syntax set:Or, you could set the filetype for any file that it’s not defined for:
Setting
filetype plugin onalong with theaucommand gives the added benefit of loading HTML plugins if you have any. This also sets the syntax to “html” as well.