1. 11
  1.  

  2. 3

    In emacs, there are some facilities to solve this problem (http://www.emacswiki.org/emacs/MultipleModes). They’re less general (typically only some combination of html, js, php, css, etc.) but tend to be more automatic. MuMaMo is fairly solid.