如何在Atom编辑器中自动缩进代码?在其他编辑器中,您通常可以选择一些代码并自动缩进。

还有快捷键吗?


当前回答

这是我找到的最好的帮助:

https://atom.io/packages/atom-beautify

这个包可以安装在Atom中,然后按CTRL+ALT+B解决这个问题。

其他回答

如果你有热键的问题,尝试打开键绑定解析器窗口Cmd + ..它会实时显示你正在按的键。

例如,Cmd + Shift + '实际上是Cmd + "

Ctrl+Shift+i worked for me in PHP under Windows ... but some files did not react. Not being the brightest it took me a while to work out that it was the include files that were the problem. If you are using echo(' ... PHP ...') then the PHP does not get re-formatted. To get over this, create a temporary PHP file, say t.php, copy the PHP part into that, reindent it (Ctrl+Shift+i ... did I mention that?) and then copy the newly reformatted PHP back into the original file. Whilst this is a pain, it does give you correctly formatted PHP.

这是我找到的最好的帮助:

https://atom.io/packages/atom-beautify

这个包可以安装在Atom中,然后按CTRL+ALT+B解决这个问题。

您可以快速打开命令面板并在那里执行 Cmd + Shift + p搜索编辑器:自动缩进:

我更喜欢使用原子美化,CTRL+ALT+B(在linux中,也可能在windows中)处理更好的各种格式,它也是自定义每个文件格式。

更多详情请访问:https://atom.io/packages/atom-beautify