Jetbrains-Select-In-Project-View
如果你想在 Project 视图中定位到当前正在编辑的文件[1]
自定义快捷键
- 打开 Settings/Preferences(
Ctrl + Alt + S或⌘ Command + ,)。[2] - 选择 Keymap。[3]
- 搜索 “Select File in Project View”。[4]
- 给这个动作分配一个你喜欢的快捷键。(我自己用的
alt + shift 1)[5]
JetBrains Guide 的 Select Opened File tip 说明,可以用 Project tool window 中的 Select Opened File 图标定位当前文件,也可以用 Select In action;IntelliJ IDEA Project tool window 文档还说明
Always Select Opened File会自动选中当前编辑器文件:https://www.jetbrains.com/guide/java/tips/select-opened-file/、https://www.jetbrains.com/help/idea/project-tool-window.html。 ↩︎JetBrains 的 Configure keyboard shortcuts 文档把添加快捷键的入口放在 Settings dialog 的 Keymap page,并以
Ctrl+Alt+S作为打开 Settings 的快捷键示例:https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html。 ↩︎JetBrains Keymap 文档说明 Keymap 页面用于搜索 shortcuts 和 actions、创建/编辑 keymap,并修改 custom keymap 中 action 关联的快捷键:https://www.jetbrains.com/help/idea/settings-keymap.html。 ↩︎
JetBrains Configure keyboard shortcuts 文档说明,可以在 Keymap 页面通过搜索字段按 action name 查找需要的 action;如果知道快捷键,也可以用 Find Action by Shortcut 反查:https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html。 ↩︎
JetBrains Configure keyboard shortcuts 文档说明,为 action 添加快捷键时,右键 action 选择 Add Keyboard Shortcut,再输入组合键;如果存在冲突,IDE 会显示 warning,系统或第三方快捷键冲突也应重新分配或禁用:https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html。 ↩︎