Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure right margin for editor in IntelliJ on per project basis

Tags:

Is there a way to configure the Right Margin (columns) (under Code Style -> General) on a per project basis?

OR/AND is there a way to configure that same value on a per language basis. For example, I want my Java code to end at 90 columns, but my HTML to end at 120.

Thanks!

like image 301
user1902183 Avatar asked Oct 17 '13 10:10

user1902183


People also ask

How do I change the indentation level in IntelliJ?

If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. On the appropriate language page, on the Tabs and Indents tab, specify the appropriate indents options and click OK.

How do I set tab space in IntelliJ?

In IntelliJ IDEA, to convert existing tabs to spaces or vice versa, use File → Edit → Convert Indents → To Spaces (or To Tabs). The Reformat code shortcut Ctrl + Alt + L will also do this, while applying other changes.

How do I view two files side by side in IntelliJ?

You can view multiple files at the same time using Split Horizontal and Split Vertical. How to use: Invoke the Split Horizontal or Split Vertical via Find Action, Ctrl + Shift + A on Windows/Linux or ⌘ + ⇧ + A on macOS, then type the action names you need.


1 Answers

You can override the global setting with a per-language settings under Editor -> Code Style -> -> Wrapping and Braces. Example:

enter image description here

like image 58
vikingsteve Avatar answered Oct 05 '22 16:10

vikingsteve