Sublime Text 2 - Files not opening a new tab?

vernonk picture vernonk · Mar 2, 2012 · Viewed 39.3k times · Source

Sublime Text 2 stopped creating a new tab when opening a file from the sidebar.

The file I select opens in the current tab, but the tab doesn't even update the filename, it shows the old file but it's greyed out like a new tab should exist.

I disabled the few packages I have installed with no luck.

My custom user settings aren't much at all:

{
  "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
  "font_face": "Consolas",
  "font_size": 12,
  "font_options": "subpixel_antialias",
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "use_tab_stops": true,
  "fade_fold_buttons": false
}

Any ideas of what's happening? I can't seem to find anyone else having this issue.

I reverted to a freshly installed state by removing my data folder and I still do not get tabs when clicking on files from the sidebar in a project.

Solved! What an idiot. The single click is apparently just a preview of the file. Double-click actually opens the file in a new tab.

Answer

BoundinCode picture BoundinCode · Mar 3, 2012

Ironically, this is a feature and not a bug. Sublime Text 2 calls it a preview. You are presented with the contents of a file without actually opening the file. This is a confusing concept for new users but is certainly helpful. A tab for the preview should appear as soon as you begin editing the file or when you double-click on the file in the sidebar.

This has been discussed more in depth on the ST forum in "2 OS X Bugs".

Personally, I believe this should be more clear. I've proposed some additions to the preview feature that can be found in "I Present To You: The Sublime Manifesto".

Note: As of Build 2198 (released in early June) there is a new setting:

// Preview file contents when clicking on a file in the side bar. Double
// clicking or editing the preview will open the file and assign it a tab.
"preview_on_click": true

Setting preview_on_click to false will disable the single-click preview while double-clicking will still open the file. This setting should clear up some confusion.