Titus
Titus

Reputation: 4627

Search and focus on windows in Visual Studio Code?

The Command Palette (CMD + P) is great for finding and opening files in a given project. However, is there anything similar for searching through all open windows in Visual Studio Code?

Let's say I open VSC for a project in projects/Alphabet and another in projects/Twitter. Then I would love to be able to hit a hotkey that opens a search window. When I type in tw it should list the Twitter project and when I press enter, it should focus on that VSC instance.

I found a generic solution as an Alfred Workflow (https://github.com/jnewland/alfred-open-windows), but while it works in most instances, it currently does not work for Visual Studio Code (https://github.com/jnewland/alfred-open-windows/issues/5).

Upvotes: 4

Views: 1269

Answers (1)

kwood
kwood

Reputation: 10914

There is a relatively new feature called "Switch Window" that does exactly this - narrow down search on all open instances. Just search with cmd+shift+p for it or bind workbench.action.switchWindow to a shortcut of your liking (its not bound to a key by default).

Upvotes: 8

Related Questions