Automatic line wrapping

I only learned about PhpStorm yesterday but love it already! All the other IDEs I've tried are missing something, but PhpStorm is almost perfect. Except for one thing: I can't get the automatic code formatter to wrap long comments. I've looked through all the settings, but there just doesn't seem to be a way to make the right margin apply to comments automatically. Is there any way to get this done? Having to adjust line breaks for the whole block manually every time I edit a comment is a deal breaker...

Netbeans and Eclipse are lacking some features from PhpStorm I'd like very much to use and am even willing to pay for, but not at the expensive of manually editing all documentation. And switching back and forth between two IDEs is a bit of an overkill. So please, please, tell me that I just overlooked a setting and explain to me how I can automatically format comments so they don't exceed a line length. My gratitude would be eternal.

2 comments
Comment actions Permalink

Enable File | Settings (Preferences for Mac) | Code style | PHP | PHPDoc | Wrap long lines.

2
Comment actions Permalink

Thank you for your reply. That works like a charm, though it requires the preview version of PhpStorm 8. In PhpStorm 7 it only wraps at the editor's border, not at the configured right margin, and it only softwraps. I wanted the code to be adjusted so it would also be well readable when sharing the file with someone else or placing it on github. This is not possible in PhpStorm 7, but it is implemented perfectly in version 8.

0

Please sign in to leave a comment.