38

I noticed in Visual Studio 2013 that when you open a document via 'go to definition/f12' the document is only opened temporarily, as soon as you navigate away from the document it closes again.

Now you have to click on the 'keep open' icon in the tab. How do I 'keep open' all those files automatically like in previous versions of Visual Studio?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Elger Mensonides
  • 6,930
  • 6
  • 46
  • 69

3 Answers3

41

This is an optional feature which gives quick navigation to every file in Visual Studio. If you need to keep a file opened all time, you need to double click it.

Single click will open the file temporarily until you decide to open another file which opens in the same preview window. This feature can be disabled using:

TOOLS → Options → Environment → Tabs and Windows → Preview Tab → Single-click

IMO, this is a handy feature (explained here) just to avoid cluttering up the working space.

Community
  • 1
  • 1
Nexus23
  • 6,195
  • 9
  • 50
  • 67
  • I personally like the new feature. Most of the time, a file is opened for "intermediate tracing" which leads to another definition. This is especially true when a definition being traced leads to a macro or nested macros. The new feature allow me open what "need to" be open. – Xephon Dec 11 '13 at 15:13
  • 6
    I guess i'm too much used to the old situation. Constantly looking for that opened doc that has been closed again ;) – Elger Mensonides Dec 11 '13 at 16:17
  • 2
    When a file is open the temporary Preview Tab you can press Ctrl+Alt+Home to keep the file open in a normal tab. Also, if you open several class files using F12 in the Preview Tab you can then use Ctrl+- to navigate backwards through the class files. – Dan Aug 25 '14 at 18:42
28

From Stack Overflow question How to have a file open normally in Resharper instead of in Keep Open mode:

Simply go to: Tools ? Options ? Environment ? Tabs and Windows

Then uncheck the "Allow new files to be opened in the preview tab" in the Preview Tab section

Uncheck all to be able to do F12

It will disable all preview features, but at least you will be able to do F12 as you wish.

Community
  • 1
  • 1
Olivier de Rivoyre
  • 1,579
  • 1
  • 18
  • 24
14

I was annoyed by this feature as well, until I discovered the shortcut Ctrl+Alt+Home.

If you press that in a document that was just opened, it will be opened permanently.

You can also click on the small button 'Keep Open' here:

enter image description here

Jonas Sourlier
  • 13,684
  • 16
  • 77
  • 148