find action: ctrl+shift+A 所有的操作都可以通过该搜索找到
1 定位
1.1 跳转
previous project window: ctrl+alt+[
next project window: ctrl+alt+]
recent files: ctrl+E
recently changed files: shift + ctrl + E
last edit location: ctrl+shift+backspace
back: ctrl + alt + left
forward: ctrl + alt + right
Book marks:
set|remove marks: ctrl + F11
jump to marks: ctrl + mark number
show marks: shift + F11
Favoriates:
open favoriates: alt + 2
add favorites: shift + alt + f
编辑区和文件区的切换:
跳转到项目文件区 alt + 1
回到代码编辑区 Esc
1.2 精准搜索
类文件: ctrl + N 连按两下N可以搜到jar包中的文件
文件: shift + ctrl + N
寻找方法和成员:shift + ctrl + alt + N
字符串搜索:shift + ctrl + F
2 代码小助手们
2.1 列操作
选中类似的列 shift + ctrl + alt + J
跳过单词 ctrl + left|right
选中单词 shift + ctrl + left|right
光标移动到行首|尾 home|end
选中光标位置到行首|尾 shift + home|end
2.2 Live Templates
live template可以定义代码模板,提高书写代码的速度。我们先看一下Live Templates中常用的有:other、output、plain
我们可以根据需要自定义模板
2.3 postfix
无法自定义,很好用
2.4 智能提示 alt + enter 应用
- 创建函数
- list迭代for转foreach
- 字符串拼接转format
- 实现接口
- 拼写错误修正
- 导包
3 编写高质量的代码
3.1 重构
修改字段 shift + F6
重构方法 ctrl + F6 或者智能提示 alt + enter
3.2 抽取
抽取变量 ctrl + alt + V
抽取常量 ctrl + alt + C
抽取字段 ctrl + alt + F
抽取参数 ctrl + alt + P
抽取方法 ctrl + alt + M
4 寻找修改轨迹
4.1 git的集成
其他
代码格式调整:ctrl + alt + L
本文提供了IntelliJ IDEA中各种高效操作的快捷键指南,包括文件导航、代码编辑、重构及Git集成等实用技巧,帮助开发者提升编程效率。
2469

被折叠的 条评论
为什么被折叠?



