Different Right Margin for Different File Types?
已回答
I work on a project that has lots of Python and JavaScript code. Code Style guidelines for the two are different, and this includes max line length: PEP8 for Python specifies 79, while AirBNB ES6 states 100.
Can I configure PhCharm so that the right margin line changes depending on the file being open (.py vs .js / .es6)?
请先登录再写评论。
You could configure Right Margin for Different Languages in Settings| Code Style| <Language>| Wrapping and Braces| Right Margin.
In Settings| Code Style| there is no entry for MarkDown (.md), and I need to set it's Right Margin to something like 60 to be able to work with the new split editor+preview mode of the plugin. How can I override just .md right margin?
I miss the option to specify right margin for Markdown files, too. IDEA should allow to set this per file-type if it's not supported by the code style.
@Mark: You can always enable soft-wraps for active editor when in Markdown file, although you need to activate it every time you open an .md file.
It would be nice if all file types had their own right margin for sure. My workaround is to use the default Code Style margin to catch all the files that don't have the setting and set the languages that do individually. So my default is 100 and then Python is specifically 80.