Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure VS Code to switch to already open tab in another tab group when opening a file [duplicate]

When I open a file in VS Code using Ctrl/Cmd+P, the file is opened in the current tab group of the current editor (even if the file is already open in another tab group).

I am sure there is a setting that will switch the behaviour so that if the file I am opening is already open in another tab group, then the editor will switch to the tab of the already open file (in the another tab group).

But what is the setting to configure this behaviour?

like image 761
aljam Avatar asked Dec 14 '25 18:12

aljam


1 Answers

Setting is Workbench > Editor: Reveal If Open

// Controls whether an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, e.g. when forcing an editor to open in a specific group or to the side of the currently active group.

"workbench.editor.revealIfOpen": true,

like image 120
Mark Avatar answered Dec 17 '25 08:12

Mark



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!