Visual Studio 2012 New Features: Preview Tab


Preview Tab Overview

We all explore code and need to move quickly between files when examining code to get familiar with it or debugging or [insert file browsing scenario here]. In prior versions of Visual Studio you had to open a file to look at the contents which often resulted in many open files (tabs) when you were done. The Preview Tab eliminates the need to open files when browsing code. Most likely you’ll first encounter the Preview Tab when you are looking at files with Solution Explorer. When you click on a supported file type, you will see the contents of that file in the new preview tab (to the far right in the tab well):



If you click anywhere inside the file the tab will go from grey to purple to distinguish it from regular (blue) tabs:



Again, the point of the preview tab is to let you view the contents of a file without actually opening up a new tab in the tab well. As you look at different files the preview tab only shows the contents of the file you are currently on. This keeps the environment from getting cluttered with open tabs and allows you to focus on only those files that are interesting to you. Solution Explorer isn’t the only place you can use the preview feature. It turns up in several situations where you might need to look at file content. For example, when using Find in Files (CTRL + SHIFT + F) to locate information you will see the preview tab:




Promoting Previews

At some point you may decide to promote the preview to an opened tab in the Tab Well so you can do additional work on the file or just keep it around for other purposes. There are a few ways you can make this happen.


Click the Keep Open button

Probably the least useful and and least likely technique you will use is to click on the tiny Keep Open button on the Preview Tab.  It’s not only useless it’s actually kind of annoying for some reason I can’t identify:



Double Click the File

The most likely approach is you will just double click the file in Solution Explorer or whatever results dialog you happen to be in.



With the cursor inside the file (the tab is purple), just press CTRL + ALT + HOME to open a tab for the file you are currently viewing.


Change the File

While previewing a file, if you make any change to the file it will automatically be promoted to an open tab so that you can make additional changes and do any other actions you need to perform.


Click the Preview Selected Items button

Another button is useless and a waste of space on the Solution Explorer toolbar is the Preview Selected Items button.  You can click it to preview the current file and its only use that I can find is if you turn off single clicking a file to preview it (see below).  Also the tooltip would lead you to believe that you can select multiple files and preview them.  Nope.  Doesn’t work.  Don’t waste your time with this button.




Turning Preview Off

To see the options you have for using the preview feature, just type preview in Quick Launch (CTRL + Q) and click Environment -> Tabs and Windows:



This will take you to Tools | Options | Environment | Tabs and Windows:




To turn off the preview feature (NOT suggested unless you are having performance issues with it) uncheck the Allow New Files to be Opened in the Preview Tab option. Also notice you can decide if a single click open the files in for preview in Solution Explorer and Find dialogs. For Solution Explorer you can use ALT to prevent a file from being previewed when you click on it. While I see the value in using ALT to prevent preview from happening. I haven’t yet found any reason for turning off the single-click option as it, in effect, forces you to use the Preview Selected Items button which is a lot of extra work and kind of defeats the purpose of the feature.




The Preview Tab is one of my top two favorite features in Visual Studio 2012 (the other one being project round-tripping).  You definitely want to leverage this feature to make your life easier.

Comments (19)

  1. SM says:

    Don't care for this feature a single bit and sorry to say find it rather distracting. I'm glad there is a way to turn it off as I actually went looking for it.

  2. zainnab says:

    Hey SM 🙂

    I obviously love this feature but can see how it might be a distraction for some folks.  It took me a little while to get used to it but, when I did, I found it indispensable.  


  3. andrew thomas says:

    sometimes i click on file to give focus to the solution explorer and it not only previews them, it somehow modifies the files and checks it out of source control.  very annoying.

  4. Amrish says:

    Single click file preview has been one irritating feature (it could just be me!) and I did not like that it was enabled by default. I am glad that I could turn it off.

  5. srHunter says:

    Now that I understand it (thanks to your explanation) I do like it and I am sure I will grow to love it.  Realizing now that double-click works the way it always has makes this feature useful.  Thanks!

  6. Dan says:

    I just turned this off for fear that I would be using Go To Definition to jump between multiple objects and then lose my place, so to speak.  I noticed that if you jump from A to B to C and then close C, it takes you back to A.  Would be nice if it was a stack and took you back to B.  I like the single click preview, but don't want it if I'm jumping between things.  Any way to do that?

  7. zainnab says:


    Not 100% sure what you are saying.  If you preview a method and then go to definition and do another go to definition on something from there the Preview tab's only job is to show the current file you are in.  It doesn't have any intelligence to remember where you are and if you close it, you have to click on file to get it back.

    In the scenario you described, i would do my Go to Definitions then use Navigate Backward (CTRL + -) to go back the way I came.  The Preview Tab would show the corresponding files that each item was in.  Am I missing something here?


  8. Richard says:

    I was searching for a way to disable this annoying feature simply becuase I didn;t understand it and hadn;t connected the dots. Now that Ive found trhis articel that explains what that extyra tab is out to the far right I love it. It definitely reduces clutter, its a great idea.

  9. zainnab says:

    Hey Richard 🙂

    Glad you like it!


  10. Phil says:

    Thanks for the info on how to turn off this terrible anti-feature.  Trying to learn a new codebase is awful when hitting F12 to go to definition doesn't actually open the file, but instead shows a weird read-only right-aligned tab that disappears.

    Turning off this 'feature' has restored my productivity.  Thanks!

  11. zainnab says:

    Phil 🙂

    Some folks love this feature but it may not be for everyone. If you have an idea for how to make it better I would definitely submit it to


  12. Rohit says:

    I installed VS 2012 today and found the new feature the most annoying thing in VS 2012. Wonder which PM got a promo for this one?

  13. Roghar says:

    I had to upgrade to 2012, and one of the things I hated most (apart from the disgusting Win8-like skin, yuk) was that while debugging I usually browsed through the code in tabs to the left, and sometimes in this ominous single tab to the right. After finding this article I now finally understand what it is good for, but I still turned it off, since I found it to still be distracting.

    My advice would be to add a msgbox with a "don't show again' button when the tab is used the first time with an explanation why the file is opened in this tab, and what the tabs purpose is. Personally I was totally puzzled by this behaviour, so a quick on-screen explanation would have helped to shed some light on this feature (maybe before I started to hate it, and just had to turn it off 🙂

  14. zainnab says:

    That's a good idea Roghar. 🙂

    I'll surface that feedback to the team.


  15. billyj says:

    i completely agree with other commenters that this is the single biggest useless and distracting feature of vs2012/2013. It forces users to change their mental model when working in VS, with little benefit.

  16. Iulian Radulescu says:

    Now that I understand what it does, i love it !

  17. Nithin says:

    Is there a limit on the file size which can be previewed? I'm asking this because I got a message on the Status bar 'This item is too large to preview' while previewing large files.

  18. hana says:

    Thanks~ Finally I can turn it off. I don't like single click -> view file.

  19. Catto says:

    Hey Now Zain;

    For years I've enjoyed this blog of VS tricks.

    Not sure if you've ever covered this one similar to the above.

    If we want to select multiple files in the 'Solution Explorer' we can obviously hold ctrl and click on them one by one. We would like that we could use ctrl + shift and select the top and bottom of a range of files as in windows explorer but we cannot.

    So here is the tip: How to select multiple files in the solution explorer by selecting the top and bottom file. We can press Alt + Shift click the top file then click the bottom file and all the files in between will be selected. This is handy if we want to update many service references in a WCF project and update all of them.

    Thanks again for all the info over the years.


Skip to main content