如何:转到文件 (#) 转到同一对话框中的符号

How to: Go to file (#) Go to for symbol in the same dialog

我非常想念 Sublime Text 中的这个功能。 Go to Symbol in Workspace 感觉非常接近它,但到目前为止 away.This 在以下示例中非常有用:

您有许多 类 具有相同的 symbol/function 名称,预过滤文件可以让您非常快速地跳转到准确的定义

您知道文件的名称,但不确定 symbol/function 的确切名称。模糊搜索超快

您想快速预览给定文件中的可用内容symbols/functions

下面是演示 Sublime Text 中此功能的示例视频:

https://youtu.be/48f3N0hCaBU?t=109

如果目前无法实现,是否可以作为扩展实现?

我创建了一个提供类似功能的扩展: https://marketplace.visualstudio.com/items?itemName=Cmacu.gotoanything

这是在 v1.44 中添加的。参见 https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_44.md#navigate-from-files-into-symbols

You can now continue to navigate into symbols of a file result simply by typing @. For the file that is currently selected, all symbols will appear and the editor will open in the background to reveal the active symbol.