10

In Visual Studio Code supposed to replace/override an existing file tab? When I click package.json with nothing on the editor, it opens package.json . When I click on README.md it replaced the package.json file with the README. See GIF link below for a visual picture.

enter image description here

Note that these happen after I click the file

soundslikeodd
  • 1,078
  • 3
  • 19
  • 32
RocketBear27
  • 103
  • 6
  • 2
    Welcome to Stackoverflow. Please edit your question to clarify your clear problem description and copy paste the code into the question. For guidance please check the [how to ask](https://stackoverflow.com/help/how-to-ask) page and [how to create a minimal example](https://stackoverflow.com/help/mcve). Read the links and take the tour *before* you start editing! – 5th Aug 10 '18 at 15:22
  • Yes, that is the preview option. Search here or in your settings for "enablePreview" to see how to disable it or work around it. – Mark Aug 10 '18 at 16:36

1 Answers1

17

Yes, that's a feature called Preview Mode. It provides a way to quickly review files without collapsing your editor with open files. You can tell the file is in preview mode by the italics on the tab.

You can pin the file by double-clicking on the tab (italics go away) or disable the feature altogether:

  • workbench.editor.enablePreview to globally enable or disable preview editors
  • workbench.editor.enablePreviewFromQuickOpen to enable or disable preview editors when opened from Quick Open
Álvaro González
  • 142,137
  • 41
  • 261
  • 360