开发者

PHPStorm/Webstorm setting to adjust # of "peek" lines at top of control statement

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 defi开发者_如何学Cnition.

I have my code style appropriately specified under settings/code style, but this doesn't seem to be helping. This problem is very annoying!

PHPStorm/Webstorm setting to adjust # of "peek" lines at top of control statement

PHPStorm/Webstorm setting to adjust # of "peek" lines at top of control statement



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:

PHPStorm/Webstorm setting to adjust # of "peek" lines at top of control statement


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜