[phpstorm] Word wrapping in phpstorm

How can I enable Word wraping in phpstorm? I need to enable it only for some of my files (with extension .txt). Is is possible?

This question is related to phpstorm

The answer is


You may also want to consider the Wrap to Column plugin, which implements the equivalent to Alt-q in Emacs and gq in vim. This may be preferable to having very long lines that are wrapped by the editor.

This plugin can be installed from any IDEA-based IDE by searching for Wrap to Column.

It has the additional benefit that you can choose to wrap only sections of text that you want :-)


In addition to Settings -> Editor -> Use soft wraps in editor I recommend Use soft wraps in console and Use custom soft wraps indent with a setting of 4 to make the wraps indented to match the line they started on.


You have to enable Soft Wraps. Find that option through this path.

View > Active Editor > Use Soft Wraps

wrap words in PhpStorm


WebStorm 10.0.4

For wrapping text/code line by deafault, but for all types of file: File -> Settings -> Editor -> General -> section "Soft Wraps" -> checkbox "Use soft wraps in editor"

(imho)


Right click on the line number area and choose:

Soft-Wrap All Files or Soft-Wrap Current File, i.e.:

enter image description here


In PhpStorm 2019.1.3, it is possible to enable soft wrap for some file types only.

enter image description here


If using PhpStorm 2019 and higher

Phpstorm Word Wrapping Settings Screenshot

File > Settings > Editor > General

There is'Soft-warp files' input under the 'Soft Warps' Header.

*.md; *.txt; *.rst; .adoc;

Add the file types to this field in which files you want them to be used.

*.md; *.txt; *.rst; .adoc;.php;*.js


For Word Wrapping in Php Storm 2019.1.3 Just follow below steps:

from top nagivation menu

View -> Active Editor -> Soft-Wrap

that's it so simple.


  • File | Settings | Editor --> Use soft wraps in editor : to turn them on for all files by default.

  • File | Settings | Code Style | General --> Wrap when typing reaches right margin

    .. but that's different (it will make new line).


For Word Wrapping in Php Storm 1. Select File from the menu 2. From File select setting 3. From setting select Editor 4. Select General from Editor 5. In general checked Use soft wraps in editor from Soft wraps section


In PhpStorm 2019.1.3 You should add file type you want to make soft wrapping on it

go to Settings -> Editor -> General -> Soft-wrap files then add any types you want

enter image description here