Vim language support issues for web development
I am trying to use Vim for web development but having trouble dealing with multiple languages in the same file. I may have php, html, javascript, and css all in the same file, but Vim will base the indentation, coloring, plugins, etc. just based on one of the languages.
Know of any plugins or vimrc hacks to fix th开发者_如何学运维is? Thanks.
You can use the dotted 'filetype'
syntax. For example, you can :set ft=html.php
when you are working on a file containing both HTML and PHP code. I personally do this to activate snipMate's HTML and PHP snippets for the file being edited.
I am trying to use Vim for web development but having trouble dealing with multiple languages in the same file.
I have never tried that myself, but official VIM Wiki has the dedicate article for that: Different syntax highlighting within regions of a file.
精彩评论