File->Settings->Editor->General->Appearance->show line numbers 本文转自http://wlb.wlb.blog.163.com/blog/static/467413201521893931170/,所有权力归原作者所有。