For some time now, it's been bugging me that vim doesn't do syntax highlighting for those apache configs (nor the wsgi files). I finally decided to do something about it, and I'm glad I did, because it's a fairly simple fix:
My project directory layout often look like this:
Vim does syntax highlighting for apache files based on their path. To get vim to recognize the files in the apache_configs directory, you need to edit (or create) ~/.vim/filetype.vim and add the following:
au BufNewFile,BufRead ~/django_projects/de_concierge/apache_configs/*wsgi setf python
au BufNewFile,BufRead ~/django_projects/de_concierge/apache_configs/* setf apache
You'd have to add variants of this for each separate project, but this works well for me.
There's several other ways you can modify this, and the solution that I used comes from this thread on the vim_mac mailing list. (There's also a lot of good info in :help new-filetype ). comments powered by Disqus