I have the following gray line that limits the number of characters a single line can accomodate:
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?
mode): 32767, otherwise 2147483647 characters. Longer lines are split. Maximum number of lines 2147483647 lines.
To configure the line length, open settings Ctrl+Alt+S , navigate to Editor | Code Style, and type the necessary length in the Hard wrap at N columns field. Wrap if long: break a section of text into lines so that each line fits the configured line length.
File -> Settings ( Ctrl + Alt + S ), then Editor -> Code Style : To follow PEP-8 set Hard wrap at to 80. Save this answer.
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.
Default value can be set at
Settings/Preferences | Editor | Code Style --> Right margin (columns)
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
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
Or Settings/Preferences | Editor | Code Style | Your Technology(ex. PHP) | Hard wrap at
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With