在日常PHP项目开发中,使用 Phpstrom 单行注释时,注释符号「//」没有和代码缩进的位置对齐。
注释不对齐情况:
function test() { //这是注释 // return false; }
而我们想要的是下面这种:
function test() { //这是注释 //return false; }
设置方式:
菜单栏:File > Settings > Editor > Code Style > PHP
取消勾选「Code Generation」 选项卡下的「Line comment at first column」
添加勾选 「Code Generation」 选项卡下的「Add a space at comment start」
设置好后,依次点击「Apply」、「OK」按钮,使配置生效。
原创文章,作者:管理员,如若转载,请注明出处:http://www.bajiege.com/archives/958.html