A whole decade ago (yikes, I’m getting old…) I wrote about how I was Organizing Windows and Multiple Monitors. I still use that approach when I’m working on a PC with dual monitors. The only thing that has changed is how I get it to work in Visual Studio 2017.
So, let me explain the steps I take.
I first set all the windows in VS according to how I want them when I’m focused on coding. In that case, I want to make full use of all my real state, which means, use my screens wisely. My dual-monitor setup look somewhat like this:
Once I found my perfect setup, I then export my settings by going to Tools -> Import and Export Settings…:
I then unselect all settings and select only General Settings -> Windows Layouts:
I export the settings to a dual-monitor.vssettings file on a c:\tools\settings folder.
Next, when working using a single monitor (which is usually the case when I’m in a conference room and projecting my screen), this is what my single-monitor setup looks like:
Once I’ve found my perfect setup for single monitor work, I export the windows layout settings to a single-monitor.vssettings file to my c:\tools\settings folder.
Now, whenever I want to switch between the different layouts, all I need to do is to import the settings accordingly.
But if you’re switching between layouts too often every day, then automate the process of importing settings!
It seems like VS 2017 has dropped support for Macros (seriously?). Fortunately, there’s a nifty extension out there called Visual Commander (I mentioned I was using it for Toggling Visual Studio CodeLens On/Off, remember?).
Once you’ve installed Visual Commander, you are welcome to download the commands I created to import single/dual monitor VS settings and import it into your Visual Commander setup. Once you’ve imported it, you can easily switch between layouts by using the commands under the VCmd menu:
The VCmd commands are simple macros that automate that simple process.
Also, if being two clicks away (or Alt+C + a few key strokes to access the menu option and hit Enter), you can set a shortcut in VS to access those commands! (See this other post if you need to learn how to do that).