phpstorm中找到
Preferences(Settings) > Editor > General > Appearance >"Show hard wrap guide (configured in code style options)"
phpstorm中找不到"Show hard wrap guide (configured in code style options)"那就找下面這個,可能版本不一樣:
Preferences(Settings) > Editor > General > Appearance > "Show right margin (configured in code style options)"
然後勾選。
設置豎線在第幾個字符,比如第80字符
Preferences(Settings) > Editor > General > Code Style > Default Option > Rright margin(columns) 設置成 80