Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop wrapping code when reformat code in phpstorm?

Tags:

ide

phpstorm

If my code reaches the right magin and I reformat code (Ctrl + Alt + L), PHPStorm automatically wrap code. How do I stop this (reformatting code with wrapping)? I'm working with php and other languages for web development

like image 480
Manhhailua Avatar asked Feb 25 '14 16:02

Manhhailua


People also ask

How do I turn off auto format on Goland?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. Switch to the Formatter tab and enable the Turn formatter on/off with markers in code comments option.

How do I turn off word wrap in Intellij?

Right-click the left gutter and from the context menu, either select or clear the Soft-Wrap Current Editor option.

What does rearrange code do in Intellij?

Reformat and rearrange code AppCode lets you reformat your code according to the requirements you've specified in your current code style scheme. You can reformat a part of code, the whole file, group of files, a directory, and a module. You can also exclude part of code or some files from the reformatting.


2 Answers

See under Preferences > Code Style, where you can tweak by language.

Also check the settings under Preferences > Code Style > General (affects all languages):

PhpStorm > Preferences > Code Style > General

like image 126
dalevink Avatar answered Oct 06 '22 02:10

dalevink


I found this worked for me for the auto format wrapping issue: Preferences > Editor > Code Style > HTML
From there, change the Wrap Attributes dropdown select to Do not wrap and I also unchecked the box Wrap Text. See below: enter image description here

Edit: I should add that I have the PhpStorm version 2018.2

like image 30
yb50110 Avatar answered Oct 06 '22 03:10

yb50110