我的问题是在新行中使用花括号,我得到了额外的缩进,如下面列出的代码所示。
我在debian-lenny上使用emacs 22.2,我已经从github安装了php-mode.el
(https://github.com/ejmr/php-mode/blob/master/php-mode.el)
而且我的.emacs只包含键绑定(不是缩进)
if (logical condition)
{
avariable
#COMMENT
if (logical condition)
{
if(condition)
{
variable
................我已经为所有的php文件尝试了PEAR模式,我已经尝试了tab模式的缩进。
求你,我做错了什么?
更新:
上面是默认的"GNU“缩进样式。对于标准的php缩进,将以下代码添加到.emacs中
(setq c-default-style "linux“c-basic-offset 4)
答案在这里:http://www.emacswiki.org/emacs/IndentingC#toc2
发布于 2011-08-30 20:40:22
上面是默认的"GNU“缩进样式。对于标准的php缩进,将以下代码添加到.emacs中
(setq c-default-style "linux“c-basic-offset 4)
答案在这里:http://www.emacswiki.org/emacs/IndentingC#toc2
https://stackoverflow.com/questions/7228529
复制相似问题