1.自动去除不使用的import
file -> settings -> Editor -> general -> auto import
勾选 Optimize imports on the fly (for current project)
2.大小写不敏感
file -> settings -> Editor -> Code Completion
Case sensitive completion 改为 none
3.显示多个文件
file -> settings -> Editor -> Editor Tabs ->
取消打钩 Show tabs in single row
Tab limit 改为 30
效果:
4.生成serialVersionUID
file -> settings -> Inspections -> Serializable class without ‘serialVersionUID’
打钩
使用的时候当一个类写了implements Serializable之后,类名会显示黄色,此时按辅助键alt + enter即可生成
5.注解模板
file -> settings -> File and Code Templeates -> File Header
/**
* @author cdx
* date ${YEAR}-${MONTH}-${DAY}
*/
--------------以后会陆续更新更多小技巧--------------