Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top