How to make visual studio (2019) open new files always as a tab in the current window?

Viewed 173

I often use various hotkeys to navigate files in a codebase using Visual Studio 2019:

  • ctrl+, lets me type a filename, and hitting enter opens that file
  • I have ctrl+a mapped to toggle between .cpp and .h files
  • I use ctrl+] to "go to definition", etc...

I also often use a split frame: my "workspace" consists of two views of files, side by side, and each has its own list of open tabs.

The behavior I would like to force is, if I use a shortcut to open a new file (or really attempt to open a file by any means...), it should open that file in the current frame.

In fact, that IS the behavior if either A. the current frame already has the target file in an open tab, or B. neither frame has the target file open in a tab.

But when the other frame has the target file in a tab, VS switches focus to the other frame and selects that tab.

This makes it very difficult to keep one frame open as a reference, and the other as an active development buffer, as VS keeps shuffling them from under me.

0 Answers
Related