PHPStorm/Webstorm 设置以调整“查看”次数控制语句顶部的行
在 PHPStorm 中,WebStorm 和 MPS 是否存在使用 Allman/BSD 风格 编码(大括号位于单独的行上)?
当光标位于右大括号后面时,“查看”功能可以工作(显示左大括号),但它只显示一行,即左大括号的实际行,这几乎毫无价值。请注意,此功能与 CLASS 完美配合,显示两行,但不适用于 CONTROL 语句或方法。
请参阅下面的 (1) IF 语句和 (2) CLASS 定义的屏幕截图。
我在设置/代码样式下适当指定了代码样式,但这似乎没有帮助。这个问题很烦人!
更新: 这对于 JavaScript 文件非常有用...为什么不能我们对 PHP 文件有同样的行为吗?
例如,使用 JavaScript 文件效果很好:
In PHPStorm, WebStorm, and MPS, is there a setting or way to get the "peek" functionality to show two lines on a control statement (that is, IF or FOR or WHILE) when using Allman/BSD style coding (braces on a separate line)?
When the cursor is behind the closing brace, the "peek" functionality works (showing the opening brace), but it only shows one line, the actual line of the opening brace, which is almost worthless. Note this functionality works perfectly with a CLASS, showing two lines, but not with a CONTROL statement or METHOD.
See screenshots below of (1) an IF statement and (2) a CLASS definition.
I have my code style appropriately specified under settings/code style, but this doesn't seem to be helping. This problem is very annoying!
UPDATE: This works GREAT with JavaScript files... Why can't we get the same behavior with PHP files?
Example of this is working great with a JavaScript file:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PHP 未实现此功能(必须为每种文件类型/语言单独实现)。它已修复并可在 PhpStorm 2.1.1 或更高版本中使用。
对应票证:http://youtrack.jetbrains.net/issue/WI-3667?项目密钥=WI
This functionality was not implemented for PHP (it has to be implemented for each file type/language separately). It was fixed and is available in PhpStorm 2.1.1 or newer.
Corresponding ticket: http://youtrack.jetbrains.net/issue/WI-3667?projectKey=WI