Making Vim auto-indent PHP/HTML using alternative syntax
- by njbair
I edit PHP in Vim and have enjoyed the auto-indenting, but PHP's alternative syntax doesn't auto-indent how I would like. For instance, in an HTML template, Vim doesn't recognize the open control structure in the same way it does when using braces. Example:
<html>
<body>
<p>
<?php if (1==1): ?>
This line…