VS Code 中红色矩形内的文本是什么意思?

What does text inside a red rectangle in VS Code mean?

VS Code 中红色矩形内的文本是什么意思?

如果我只是开始在任何文件之外和任何东西之外输入(例如 Ctrl+P 输入或搜索输入),那么我将输入的内容添加到红色矩形内。这是我的意思的屏幕截图:

当我输入 Foo.js 时,矩形出现在我打开的 VS Code 的右上角。矩形我指的是填充的矩形,红色边框是我手动添加的以突出填充的矩形。

很好奇这样做的目的是什么?

您在红色矩形中得到的文本是 VScode 对文件名的版本控制更改执行的搜索。您可以键入更多以搜索更改列表中的特定文件。

您可以单击该框以根据您键入的内容启用或禁用过滤器

这是似乎已在 1.31 版本中发布的文档树过滤功能,请参阅 Workbench section of the release notes 更多详细信息。

当前 "Getting Started" docs 状态:

You can type to filter the currently visible files in the File Explorer. With the focus on the File Explorer start to type part of the file name you want to match. You will see a filter box in the top-right of the File Explorer showing what you have typed so far and matching file names will be highlighted. When you press the cursor keys to move up and down the file list, it will jump between matching files or folders.

Hovering over the filter box and selecting Enable Filter on Type will show only matching files/folders. Use the 'X' Clear button to clear the filter.