简体   繁体   English

如何使用IntelliJ IDEA在编辑器中快速打开列表中的下一个文件?

[英]How to quickly open next file in list in the editor using IntelliJ IDEA?

When viewing a file in IDEA's editor (with the focus in the editor), how can I quickly have it open the next file down in the list of files in the project pane? 在IDEA的编辑器中查看文件时(该焦点位于编辑器中),如何快速在项目窗格的文件列表中快速打开下一个文件?

I can just double click on the next file in the project pane which appears after the file whose contents are currently in the editor but is there a keyboard shortcut? 我可以双击项目窗格中的下一个文件,该文件出现在当前位于编辑器中的文件之后,但是是否有键盘快捷键? I looked around in the documentation and here but couldn't find such a key combo. 我在文档中四处查看,但是在这里找不到这样的组合键。

I am motivated to know this because I have a code base I want to just go through quickly, and linearly (in order the files appear in IDEA's project pane) just to check each file for certain criteria which I can only see with my eyes. 我很高兴知道这一点,因为我有一个代码库,想快速,线性地(以便文件出现在IDEA的项目窗格中)来检查每个文件是否具有某些标准,而这些标准我只能用肉眼才能看到。

It's possible to use the Find in Path action for this with a little trick. 可以通过一点技巧来使用“ Find in Path操作。

First invoke Find in Path on the directory you need, eg by typing Command + Shift + F . 首先在所需目录上调用Find in Path ,例如通过键入Command + Shift + F。 Do not specify any search text. 不要指定任何搜索文本。 Select the File mask checkbox and type * in the file mask text field. 选中File mask复选框,然后在文件掩码文本字段中输入* You can of course also type another pattern that matches all files you need to see. 当然,您也可以键入另一个与您需要查看的所有文件匹配的模式。 Now click the Open in Find Window button ( Command + Enter ). 现在,单击“ Open in Find Window按钮( Command + Enter )。 This will show all the files matching the file mask in the Find tool window. 这将在“查找”工具窗口中显示与文件掩码匹配的所有文件。 Now you can navigate them using the Navigate | Next Occurrence 现在,您可以使用Navigate | Next Occurrence导航它们Navigate | Next Occurrence Navigate | Next Occurrence action ( Command + Alt + Down ). Navigate | Next Occurrence操作( Command + Alt + Down )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM