40

I have the following gray line that limits the number of characters a single line can accomodate:enter image description here

I'd like to change the line length (this fill probably affect where this line is currently shown right now) for different files: for js, php files etc one line length, for HTML template files another. Is it possible? If not, how can I change at least for all file types?

3 Answers 3

57

This is now possible as the bug linked by @LazyOne has been resolved. You can now set different right margins for different programming languages.

The setting is under Settings | Editor | Code Style | <Your language> on the Wrapping and Braces tab at the very top of the list.

PhpStorm settings interface

30

Default value can be set at

Settings/Preferences | Editor | Code Style --> Right margin (columns)

enter image description here

Since end of 2014 (after IDEA-59662 ticket was implemented) most languages have an option to adjust that value in language-dedicated section. For example: PHP

enter image description here


For unsupported languages .. or those that do not have such option -- you may try going with .editorconfig file and EditorConfig Support plugin -- should work.

9

For those who are from 2018:

Settings/Preferences | Editor | Code Style | Hard Wrap At enter image description here

Or Settings/Preferences | Editor | Code Style | Your Technology(ex. PHP) | Hard wrap at

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.