在 IntelliJ 中定位当前文件 [英] Locate current file in IntelliJ

查看:26
本文介绍了在 IntelliJ 中定位当前文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在项目结构中定位当前文件?(类似于 Visual Studio 的 Ctrl + Alt + L).操作的名称是什么(所以我可以在keymap中定义它)

How do I locate the current file in the project structure? (Similar to Visual Studio's Ctrl + Alt + L). What is the name of the operation (so I can define it in the keymap)

推荐答案

Alt + F1(或 Alt + Shift + 1 for linux) 几乎可以满足您的需求.您需要在之后按 Enter,因为 IDEA 允许多个目标"用于导航(项目结构、文件结构等).

Alt + F1 (or Alt + Shift + 1 for linux) almost does what you want. You need to hit Enter afterwards as IDEA allows multiple "targets" for navigation (project structure, file structure etc).

(请注意,您还可以使用项目结构视图上方的两个带箭头的框"按钮将 AutoScroll 设置为 Source 和 AutoScroll from source,但这在将您推入 JDK 源代码时会很烦人,因为您遵循了对java.io.File.

(Note you can also set AutoScroll to Source and AutoScroll from source using the two "boxes with arrows" buttons above the project structure view but this can get annoying when it shoves you into the JDK source because you followed a reference to java.io.File.

键映射将其定义为在任何视图中选择当前文件或符号.

这篇关于在 IntelliJ 中定位当前文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆