1.設置格式化換行的寬度
就是這個線,那條右標準線的位置:Setting–>Editor–>Code Style。默認值是100,按照自己的需要更改。
2、設置格式化的時候自動斷行到標準線位置
這樣就不用往右拖看代碼了:Setting–>Editor–>Code Style–>Java,點擊右側標籤Wrapping and Braces下勾選Line breaks和EnSure right margin is not exceeded