方法一: 随便打开一个页面,在显示行号(最左边)这里鼠标右击,勾选"Use Soft Wraps"。 方法二: 选择"File-->>Settings-->>Editor-->>General",进入页面后,勾选"Use soft wraps in editor"。 phpstorm 2019自动换行: 如图:需要手动加上*.html;*.php 重启后生效。