How to stop from alignment with space in WebStorm - intellij-idea

When I use "Optimize imports" all imports are aligned with spaces like in the screenshot below.
How can I disable this?

Try disabling this option from 'Preferences/Settings | Editor | Code Style | JavaScript':

Related

How do I change matching brackets color's highlighting in IntelliJ?

I'm using VS-Code color theme on IntelliJ, and when I place my cursor within a few nested brackets, it becomes almost invisible since the highlighting is the same color as my cursor (see the screenshot below).
I've found Settings => Editor -> Code Editing -> Matched Brace but I want to keep the highlighting, and change it's color.
And the options in Settings => Editor -> Color Scheme -> General -> Code -> Matched Brace change the settings brackets style when they're not selected, which is not the problem I'm facing.
Settings (Preferences on macOS) | Editor | Color Scheme | General | Code | Matched brace works fine here. Make sure to change the Foreground property or remove any Effects.
The color used in your example when the caret is not placed on the parentheses is set via Settings (Preferences on macOS) | Editor | Color Scheme | Language Defaults | Braces and Operators | Parentheses.

Intellij formatter force single line if go to next line

Intellij formatter has something I hate very much and can't figure out a way to disable.
when pressing ctrl+alt+l to format code all my single line ifs without parentheses goes to one line
something like
if(true)
System.out.println("yes");
goes:
if(true) System.out.println("yes");
the multiline ifs with braces keep the original formatting but i hate very much this behavior... does anyone know how to change it?
Go to Settings/Preferences | Code Style | Java | Wrapping and Braces | Keep when reformatting and enable Line breaks option.

IntelliJ splits my code when reformatting using ctrl+alt+L

ctrl+alt+L splits my code like this:
public void message_should_be_displayed(String text) {
qip.executeAssertEquals("Asserting if correct alert msg is displayed : ", text, qip.driver.switchTo()
.alert()
.getText());
}
It puts the last 2 lines in separate lines if I do reformat. Any idea how to fix this?
Settings (Preferences on macOS) | Editor | Code Style | Java | Wrapping and Braces | Chained method calls: Do not wrap.

Formatting code in PhpStorm does not work as I need it to work

How to use automatic line wrap and code formatting together in PhpStorm? My PhpStorm version is 2019.3.1
My SQL statements and my Strings look like the pic below.
What do I have to do, that the automatic wrapped lines do NOT jump to column 1 in the editor?
What do I have to do, that the automatic wrapped lines do NOT jump to column 1 in the editor?
Configure it accordingly (affects soft wrapped lines only, obviously): Settings/Preferences | Editor | General | Soft Wraps | Use original line's indent for wrapped parts

How can I set the line limit length for different types of files?

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?
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