How to set the style of line comment in phpstorm

烂漫一生 提交于 2019-12-03 10:34:27

问题


How to change the default style of line comment in PHPStorm to at indentation level rather than at first column?

if ($condition) {
// At first column.
    // At indentation level
}

回答1:


You can change this in "Options -> Code Style -> PHP -> Wrapping and Braces" and check "Comment at first colum".




回答2:


For "Ctrl+/" line commenting it is in "Settings->Code Style->PHP->Other->Code Commeting->Line comment at first column".




回答3:


Version 2017.3 and greater

Looking at this answer, noticed that it needs a little updating. As of version 2017.3, this has been updated to:

Preferences > Editor > Code Style > PHP > (tab) Code Generation > Comment Code > (uncheck) Line comment at first column



来源:https://stackoverflow.com/questions/19417962/how-to-set-the-style-of-line-comment-in-phpstorm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!