###常用快捷键
- 格式化代码:command+option+L
- 行注释:command+/
- 块注释:command+option+/
- 查找类:command+o
- 查找方法:command+option+o
- 查找资源文件:command+shift+o
- 查看类的继承关系:control + H
- 查看类的实现类:command+option+B
- 查看并搜索类的结构:command+F12
- 文件内查找:command+F
- 全局查找:command+control+F
###实用插件
- Maven Helper:快速发现和解决依赖冲突;
- Alibaba Java Coding Guidelines:阿里Java开发规约插件;
- HighlightBracketPair:匹配括号的高亮显示;
- Lombok Plugin:Getter/Setter、ToString等方法自动生成;
###Terminal
默认为当前的bash,可以通过Shell Path属性设置为其他Shell;
###常用设置
下面的选项是设置当我们已经打开一个项目窗口的时候,再打开一个项目窗口的时候是选择怎样的打开方式:
- Open project in new window 每次都使用新窗口打开
- Open project in the same window 每次都替换当前已打开的项目,这样桌面上就只有一个项目窗口
- Confirm window to open project in 每次都弹出提示窗口,让我们选择用新窗口打开或是替换当前项目窗口。
###Git
Intellij IDEA自带了Git插件用于对Git的支持,开发人员仍需要在本地安装Git,设置安装安装目录,然后Intellij IDEA会通过插件进行调用;
####Git常用命令
- clone:git clone [url] #拷贝远程仓库到本地;
- checkout:git checkout [branch-name] #切换到指定分支;
- pull:git pull [remote] [branch] #取回远程分支的变化,并合并到本地分支;
- push:git push [remote] [branch] #上传本地指定分支到远程仓库;
- commint:git commit -m [message] #提交所有变化到本地仓库;
参考:
- Maven Helper官网:http://plugins.jetbrains.com/plugin/7179-maven-helper;
- Maven Helper使用:https://blog.csdn.net/sunpeng_sp/article/details/77393348;
- 阿里开发规约:https://github.com/alibaba/p3c/;
- 常用Git命令:http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html;
- IDEA中版本控制:http://wiki.jikexueyuan.com/project/intellij-idea-tutorial/vcs-introduce.html;