The Apache config file for my website is named
mywebsite.com. Apparently the extension
.com is causing vim to set the wrong file type as
dcl which makes the syntax highlighting wrong as well. All of my other host config files are correctly identified as Apache files.
I am able to
:set filetype=apache and everything looks great but when after closing vim and coming back to edit the file type is back to
Other than renaming my host config file, is there a solution to this? Is there a way to make vim remember the filetype of this one particular file? Or better yet, is there a way to correct this wrong file type detection?
EDIT 8/27/13 5:18pm (since superuser is not allowing me to post.. which I might add, is stupid)
As an addition to both the below answers I'd like to share what I did in the end which is to modify the main config file /usr/share/vim/vim73/filetype.vim from:
au BufNewFile,BufRead *.com call s:BindzoneCheck('dcl')
au BufNewFile,BufRead *.com call s:BindzoneCheck('apache')
I realize this may not be appropriate for every user, particularly if you ever intend to write dcl scripts, but in my case this is fine.