听说Intellij Idea是一歀神器,但一直习惯了Eclipse,一直没去尝试。 最近下定决心去体验一把。 重点关注是否提供开发效率。
天下武功为“快”不破, 所以主要从快捷键,代码提示,编译速度各方面去体验一把。下面只是部份比较喜欢用的快捷键(ctrl+alt+s)后可以看到更多。
另外感觉idea优点在于提示速度和返应速度快了,这样可以提升开发效率的。
功能 | IDEA 快捷键 | Eclipse 快捷键 | Remark |
导入类import class | Alt + Enter (当highlight对象后) | Ctrl+shit+o | |
格式化代码 | Ctrl+ALT_L | Ctrl+F | |
智能提示 | Ctrl+Space/ Ctrl+Shift+Space | Ctrl + o | |
智能提示及代码补充 | ALT+ENTER/ Ctrl+Shift+Enter | Ctrl +T | IDEA 另外的提示 Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) |
代码生成getter/setter to string | alt + insert | 右键来使用 | |
选中行上下移 | alt+shit+up/down | ctrl+alt + up/down | |
Call hierarchy | Ctrl+Alt+H /Ctr+H (method level) | 右键来使用refrector call hierarchy | |
查找打开类 | Ctrl+N | Ctrl+shit+T | |
查找打开文件 | Ctrl+R/Ctrl+Shrt+R | Ctrl+shit+R | |
上移代码 | Ctrl+Shit+up | alt+up | |
下移代码 | Ctrl+Shit+down | alt+down | |
复制行 | Ctrl +D | ctrl+alt+up/down | |
删除行 | Ctrl+x | ctrl+d | |
打开项目pannel | Alt+1 | ||
最后一次修改的地方 | Ctrl+shit+backspace | ctrl+q | |
上一次访问的文件 | alt + <- |
网上收集的一些Intellij Idea快捷键
Ctrl-N Class... (find by name)
Ctrl-Shift-N File... (find by name)
Ctrl-Shift-Alt-N Symbol... (find by name)
Ctrl-G Line... (goto line)
Ctrl-H Type hierarchy (hierarchy)
Ctrl-Shift-H Method hierarchy (hierarchy)
Ctrl-Alt-H Call hierarchy (hierarchy)
Ctrl-Q Quick documentation
Ctrl-Alt-I Auto-indent lines (indent)
Ctrl-Alt-L Reformat code (line up)
Ctrl-Alt-O Optimize imports (optimize)
Ctrl-/ Comment with line comment (//)
Ctrl-Shift-/ Comment with block comment (/*...*/)
Ctrl-W Select word or block (word)
Ctrl-D Copy line (duplicate line, yyp)
Ctrl-X Cut line (dd)
Ctrl-U Uppercase/lowercase (upper)
Ctrl-J Insert live template
Ctrl-Alt-J Surround with live template
Ctrl-Alt-T Surround with (template)
Ctrl-Shift-J Join lines (join)
Ctrl-E Recent files (editions)
Ctrl-Shift-E Recently changed files (editions)
Alt-Shift-C Recent changes (changes)
Ctrl-B Delcaration
Ctrl-Shift-B Type declaration
Ctrl-Alt-B Implementation(s)
Ctrl-P Parameter info (parameter)
Ctrl-Space Basic completion
Ctrl-Shift-Space Smart completion
Ctrl-Alt-Space Completion lookup
Alt-Enter Auto-complete
Alt-Insert Generate...
Ctrl-Shift-Up/Down Move statement up/down
Alt-Shift-Up/Down Move line up/down
Ctrl-Up/Down Scroll up/down
Alt-Up/Down Previous/next method
F2 Next highlighted error
Shift-F2 Previous highlighted error
Ctrl-F Find
Ctrl-R Replace
F3 Next match
Shift-F3 Previous match
F4 Jump to source
Ctrl-Alt-Shift-T Refactor this
F5 Refactor copy
F6 Refactor move
Ctrl-F6 Refactor change signature
Shift-F6 Refactor rename
Alt-Delete Refactor safe delete
Ctrl-Alt-V Refactor extract variable
Ctrl-Alt-F Refactor extract field
Ctrl-Alt-P Refactor extract parameter
Ctrl-Alt-M Refactor extract method