我已经尝试了我能找到的每一种 php/html 模式(包括 nxHTML),但找不到一种能以我想要的方式缩进的模式。这是我的文件包含的示例:
<?php if (a == 5): ?>
<span>test</span>
<?php endif; ?>
我希望 emacs 缩进将 if/endif 视为元素的代码,如下所示:
<?php if (a == 5): ?>
<span>test</span>
<?php endif; ?>
for 循环和其他结构也是如此。谢谢。