A VS Code extension that adds a toolbar button to the Explorer Files view. Click the button to locate the active file in the Explorer without opening the context menu or Command Palette.
Features
One-click locate: Adds a go-to-file icon to the right side of the Explorer Files title bar.
Fast navigation: Locates, expands, and highlights the file that belongs to the currently active editor.
Native behavior: Uses VS Code's built-in workbench.files.action.showActiveFileInExplorer command, so the locate behavior stays consistent with the default VS Code action.
Why Use It
When working in large projects, it is common to jump between many files. To find the current file in the project tree, you usually need to:
Right-click in the active editor and use VS Code's built-in Explorer locate action.
Switch to Explorer with Ctrl+Shift+E and search manually.
Run the command from the Command Palette with Ctrl+Shift+P.
This extension turns that repeated workflow into a single click.
How To Use
Install the extension.
Open any file.
Hover over the Files section title in the VS Code Explorer.
Click the go-to-file icon in the title bar.
VS Code locates and highlights the active file in the Explorer.
Known Limitations
The button is visible only in the Explorer Files view (workbench.explorer.fileView). If that view is hidden in your layout, the button is not shown.
The button icon uses VS Code's built-in Codicon icon set.
Changelog
See CHANGELOG.md in this repository.
在资源管理器中定位当前文件
这个 VS Code 扩展会在“资源管理器”视图的“文件”分区标题栏增加一个快捷图标按钮。点击按钮即可在资源管理器中定位当前文件,无需再打开右键菜单或命令面板。
功能
一键定位:在 VS Code “资源管理器”的“文件”标题栏右侧新增一个 go-to-file 图标。
快速访问:点击按钮后,会在文件树中展开并高亮当前激活编辑器对应的文件。
原生体验:调用 VS Code 内置命令 workbench.files.action.showActiveFileInExplorer,定位行为与 VS Code 默认操作保持一致。