File->Settings->Editor 点击general,如下如所示: 勾选 “ Use soft wrap in editor ” ,这样就可以自动换行了 https://blog.csdn.net/whq19890827/article/details/51206357