# 最近的文件和更改

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

处理项目时，经常需要在最近视图或编辑过的文件和位置之间切换。 IntelliJ IDEA 提供快速导航功能，可帮助查找并重新打开最近的文件，或再次访问已编辑的代码片段。

Procedure: 查找最近的文件

可以使用   最近的文件   弹出窗口搜索最近打开或编辑过的文件。

* 要打开   最近的文件  弹出窗口，请按 `Ctrl+E` (Windows), `⌘ E` (macOS), `⌘ E` (IntelliJ IDEA Classic (macOS)), `⌘ E` (macOS System Shortcuts), `Ctrl+E` (XWin), `Ctrl+E` (GNOME), `Ctrl+E` (KDE), `Ctrl+E` (Emacs), `Ctrl+E` (Sublime Text), `⌘ E` (Sublime Text (macOS)), `Ctrl+Comma` (Visual Studio), `⌃ Comma` (Visual Studio (macOS)), `Shift+F4` (NetBeans), `Ctrl+E` (Eclipse), `⌘ E` (Eclipse (macOS))。

![最近的文件](https://resources.jetbrains.com.cn/help/img/idea/2026.3/recent_files.png)

* 要仅显示最近编辑过的文件，请再次按 `Ctrl+E` (Windows), `⌘ E` (macOS), `⌘ E` (IntelliJ IDEA Classic (macOS)), `⌘ E` (macOS System Shortcuts), `Ctrl+E` (XWin), `Ctrl+E` (GNOME), `Ctrl+E` (KDE), `Ctrl+E` (Emacs), `Ctrl+E` (Sublime Text), `⌘ E` (Sublime Text (macOS)), `Ctrl+Comma` (Visual Studio), `⌃ Comma` (Visual Studio (macOS)), `Shift+F4` (NetBeans), `Ctrl+E` (Eclipse), `⌘ E` (Eclipse (macOS)) 或选择   仅显示已编辑项   选项。

* 要在弹出窗口中搜索项目，请开始输入搜索查询。 IntelliJ IDEA 会在输入时动态使用筛选器筛选结果，仅显示匹配的项目。

![最近文件搜索](https://resources.jetbrains.com.cn/help/img/idea/2026.3/recent_files_search.png)

Procedure: 查找最近的位置

可以使用   最近的位置   弹出窗口检查最近视图或更改过的代码。

* 要打开   最近的位置  弹出窗口，请按 `Ctrl+Shift+E` (Windows), `⌘ ⇧ E` (macOS), `⌘ ⇧ E` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ E` (macOS System Shortcuts), `Ctrl+Shift+E` (XWin), `Ctrl+Shift+E` (GNOME), `Ctrl+Shift+E` (KDE), `Ctrl+Shift+E` (Emacs), `Ctrl+Shift+E` (Sublime Text), `⌘ ⇧ E` (Sublime Text (macOS)), `Ctrl+Shift+E` (Visual Studio), `Ctrl+Shift+E` (Visual Studio (macOS)), `Ctrl+Shift+E` (NetBeans), `Ctrl+Shift+E` (Eclipse), `⌘ ⇧ E` (Eclipse (macOS))。 列表从顶部的最新访问位置开始，包含代码段。

![最近位置弹出窗口](https://resources.jetbrains.com.cn/help/img/idea/2026.3/recent_locations_popup.png)

* 要仅显示包含已更改编码的位置，请在弹出窗口中再次使用 `Ctrl+Shift+E` (Windows), `⌘ ⇧ E` (macOS), `⌘ ⇧ E` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ E` (macOS System Shortcuts), `Ctrl+Shift+E` (XWin), `Ctrl+Shift+E` (GNOME), `Ctrl+Shift+E` (KDE), `Ctrl+Shift+E` (Emacs), `Ctrl+Shift+E` (Sublime Text), `⌘ ⇧ E` (Sublime Text (macOS)), `Ctrl+Shift+E` (Visual Studio), `Ctrl+Shift+E` (Visual Studio (macOS)), `Ctrl+Shift+E` (NetBeans), `Ctrl+Shift+E` (Eclipse), `⌘ ⇧ E` (Eclipse (macOS)) 快捷键，或选择   仅显示已编辑项   选项。

![仅显示更改选项](https://resources.jetbrains.com.cn/help/img/idea/2026.3/only_changed_code_locations.png)

* 要搜索代码片段，请在   最近的位置  弹出窗口中开始输入您的搜索查询。 可以按编码文本、文件名称或 [路径导航](using-code-editor.html#breadcrumbs) 进行搜索。

![搜索位置](https://resources.jetbrains.com.cn/help/img/idea/2026.3/search_locations.png)

* 要从搜索结果中删除位置条目，请按  `删除`  或 `Backspace` (Windows), `⌫` (macOS), `⌫` (IntelliJ IDEA Classic (macOS)), `⌫` (macOS System Shortcuts), `Backspace` (XWin), `Backspace` (GNOME), `Backspace` (KDE), `Backspace` (Emacs), `Backspace` (Sublime Text), `⌫` (Sublime Text (macOS)), `Backspace` (Visual Studio), `⌫` (Visual Studio (macOS)), `Backspace` (NetBeans), `Backspace` (Eclipse), `⌫` (Eclipse (macOS))。

> **Tip:**
> 请注意，已删除的位置也会从您 [使用
> 快捷键访问](navigating-through-the-source-code.html#back_forward)的条目列表中移除。

Procedure: 查找最近的更改

可以使用   最近更改   列表获取项目中在本地或外部所做的最近更改列表。 如果有必要，您可以撤销这些更改。

1. 在主菜单中，前往  `查看 | 最近更改`  `Alt+Shift+C` (Windows), `⌥ ⇧ C` (macOS), `⌥ ⇧ C` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ C` (macOS System Shortcuts), `Alt+Shift+C` (XWin), `Alt+Shift+C` (GNOME), `Alt+Shift+C` (KDE), `Alt+Shift+C` (Emacs), `Alt+Shift+C` (Sublime Text), `⌥ ⇧ C` (Sublime Text (macOS)), `Alt+Shift+C` (Visual Studio), `Alt+Shift+C` (Visual Studio (macOS)), `Alt+Shift+C` (NetBeans), `Alt+Shift+C` (Eclipse), `Alt+Shift+C` (Eclipse (macOS))。

![“最近更改”弹出窗口](https://resources.jetbrains.com.cn/help/img/idea/2026.3/recent_changes.png)

2. 在   最近更改  选项卡的 [本地历史记录](local-history.html)工具窗口中，选择一个更改。

IDE 在下方面板中显示受此更改影响的文件列表。

3. 按 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) 或双击文件以打开差异查看器，您可以在其中检查更改内容并在必要时还原这些更改。

Procedure: 在更改之间导航

如果编辑的文件 [受版本控制](enabling-version-control.html)，IntelliJ IDEA 提供了多种方式来在更新之间前后导航。 特别是，您可以使用导航命令、键盘快捷键和更改标记。

* 按 `Ctrl+Alt+Shift+Down` (Windows), `⌃ ⌥ ⇧ ↓` (macOS), `⌃ ⌥ ⇧ ↓` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ ⇧ ↓` (macOS System Shortcuts), `Ctrl+Alt+Shift+Down` (XWin), `Ctrl+Alt+Shift+Down` (GNOME), `Ctrl+Alt+Shift+Down` (KDE), `Ctrl+Alt+Shift+Down` (Emacs), `Ctrl+Alt+Shift+Down` (Sublime Text), `⌃ ⌥ ⇧ ↓` (Sublime Text (macOS)), `Ctrl+Alt+Shift+N` (Visual Studio), `⌘ ⌥ ⇧ N` (Visual Studio (macOS)), `Ctrl+Alt+Shift+Down` (NetBeans), `Ctrl+Alt+Shift+Down` (Eclipse), `⌃ ⌥ ⇧ ↓` (Eclipse (macOS))/ `Ctrl+Alt+Shift+Up` (Windows), `⌃ ⌥ ⇧ ↑` (macOS), `⌃ ⌥ ⇧ ↑` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ ⇧ ↑` (macOS System Shortcuts), `Ctrl+Alt+Shift+Up` (XWin), `Ctrl+Alt+Shift+Up` (GNOME), `Ctrl+Alt+Shift+Up` (KDE), `Ctrl+Alt+Shift+Up` (Emacs), `Ctrl+Alt+Shift+Up` (Sublime Text), `⌃ ⌥ ⇧ ↑` (Sublime Text (macOS)), `Ctrl+Alt+Shift+P` (Visual Studio), `⌘ ⌥ ⇧ P` (Visual Studio (macOS)), `Ctrl+Alt+Shift+Up` (NetBeans), `Ctrl+Alt+Shift+Up` (Eclipse), `⌃ ⌥ ⇧ ↑` (Eclipse (macOS))。

* 在主菜单中，前往  `导航 | 下一个 / 上一个更改` 。

* 点击 [更改标记](adding-files-to-version-control.html#track_changes)，然后点击 ![上一个更改按钮](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.up.svg)或 ![下一步修改按钮](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.down.svg)。

* 若要导航到您上次编辑的位置，请按 `Ctrl+Shift+Backspace` (Windows), `⌘ ⇧ ⌫` (macOS), `⌘ ⇧ ⌫` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ ⌫` (macOS System Shortcuts), `Ctrl+Shift+Backspace` (XWin), `Ctrl+Shift+Backspace` (GNOME), `Ctrl+Shift+Backspace` (KDE), `Ctrl+Shift+Backspace` (Emacs), `Ctrl+Shift+Backspace` (Sublime Text), `⌘ ⇧ ⌫` (Sublime Text (macOS)), `Ctrl+Shift+Backspace` (Visual Studio), `⌘ ⇧ ⌫` (Visual Studio (macOS)), `Ctrl+Shift+Backspace` (NetBeans), `Ctrl+Q` (Eclipse), `⌃ Q` (Eclipse (macOS))或从主菜单中选择  `导航 | 上次编辑位置` 。

