Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I share the search pattern across VS Code windows?

VS Code: 1.23.1
OS: OSX 10.12.6

If I have two different VS Code windows/instances open- each of which could have multiple tabs, and could also be workspaces- and I run Find... in one window, the search text and settings (e.g. Match Case, Match Whole Word) in the other window are unaffected. I'd like to find a way so that these are always linked, they're always kept in sync. How can I get this?

like image 925
Joe Casadonte Avatar asked Oct 16 '25 14:10

Joe Casadonte


2 Answers

This is possible, but not the default behavior of VSCode.

Go into Settings, search for find clipboard, and you'll find two checkboxes:

  • Editor > Find: Global Find Clipboard
  • Search: Global Find Clipboard

Check both of these boxes, and now all the Search boxes across all your VSCode windows/tiles/tabs/file searches will share the same search buffer across your entire computer (on Mac, at least), just as we expect.

Why these two boxes aren't checked by default is anyone's guess.

like image 138
David Hempy Avatar answered Oct 19 '25 09:10

David Hempy


That does not seem to be possible, as each window has its own GUI states (including the current find search pattern)

This is similar to issue 10121 "Allow for floating windows" where Terminal or Debug Console would be applied to all opened editor windows instead of being tied to the current one.
For now, those GUI elements (including Find) are specific to the current opened editor, not sharing their state with other VSCode windows.

like image 25
VonC Avatar answered Oct 19 '25 09:10

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!