How to Disable Peek Definition and Preview Tab in Visual Studio

I Ctrl+click in Visual Studio all the time, and starting with Visual Studio 2013, I encountered Peek Definition and immediately found I was constantly clicking to “Promote to Document” because the Peek window is just too small for my liking. Visual Studio also opens new tabs in the Preview Tab area, instead of opening it as a normal tab. I personally didn’t like either of these features, so I began the search to turn them off.

Peek Definition

What is Peek Definition? It’s a small window that opens within your code and allows you to view or edit code in another file without opening a new tab. Here’s what it looks like:

The Visual Studio Peek Definition window just seems to small to me, so I wanted it turned off.

I believe Productivity Power Tools is the extension that makes Ctrl+click open a file in Peek Definition, so since many use that extension, I’m sure many (including yourself) set out on this same journey to obliterate this “feature.”

In previous versions of Visual Studio, I was used to just Ctrl clicking on a class, and it would open the class’ definition file in a new tab. That’s easy and shows me what I need in a full size window. I get it – Peek Definition allows you to quickly see information about the class without switching tabs, but I so often end up changing or copying something, I just like it to open in its own tab.

The Fix

You might wade through the settings in Visual Studio. What a mess. I mean, it’s great that you can customize the software in such a fine-tuned way, but my goodness – there is a setting for everything! It was really difficult to find out how to disable Peek Definition.

You can turn off Peek Definition by disabling this option:

Tools > Options > Productivity Power Tools > General > Control click shows definitions in Peek

Yay! But wait… now when I Ctrl+click a class, the file is opening a tab on the right side of Visual Studio, rather than with my other tabs! Introducing the Preview Tab.

Preview Tab

The Preview Tab allows you to preview a file without actually opening it in the tab well. It’s still opening a tab, just in a different area than the rest of my tabs. It just seemed odd to me, so I wanted it off.

The Preview Tab in Visual Studio allows you to view code in a file before opening it as a full tab.

The Fix

You can turn off use of the Preview Tab feature by disabling this option:

Tools > Options > Environment > Tabs and Windows > Allow new files to be opened in the preview tab

Now, finally, Visual Studio was back to how I like it: Ctrl+click simply opens the class definition in a new tab just like the rest of my tabs!

Your Turn!

How about you? Do you use either of these features? Why do you like or dislike them? Let’s discuss in the comments below!