Sublime Text 2 - Files not opening a new tab?

Sublimetext

Sublimetext Problem Overview


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.

Sublimetext Solutions


Solution 1 - Sublimetext

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.

Solution 2 - Sublimetext

When you open from the side bar are you double clicking? This appears to be required to properly open a file. A single click gives you a preview which is editable, new tab appears on edit.

Solution 3 - Sublimetext

Problem resolved:

Use Double click instead of single click for opening a file in a new tab, which is located in the sidebar of sublime text editor.

Solution 4 - Sublimetext

Go to Sublime --> preferences --> Settings - Default

Change the value of "open_files_in_new_window" to false and save. Now files should be opened in a new tab instead of new window.

Solution 5 - Sublimetext

For Sublime Text 3 users, remember that you will need to specify this option in the separate "Settings - user" file

See "https://stackoverflow.com/questions/20280159/change-default-settings-in-sublime-text-3" for more information.

Solution 6 - Sublimetext

When single or double clicking on the files on the sidebar to open the file you may find the filename on the tab is in the italic-theme-slanting-font which I understood as the file is not pinned to the editor. If you click another it will override the current file.

  1. You need to double-click the same current file on the side-bar again to confirm that you need to open this file further.

NOTE: The editor wont override it, you can confirm it by seeing the tab name style changing from italic to normal with a little bold from its previous form.

  1. Now you can open another file on the sidebar and repeat the process.

Solution 7 - Sublimetext

You can Double click on the file which you want to open from left sidebar, which will open file in new tab. As single click means to preview the page and you can also disable the preview option using :

"preview_on_click": false

Solution 8 - Sublimetext

Go to your Installed Packages (Preferences->Browse packages ).
Back one folder you find cache folder and local->session file , Just delete them . it ll fix your error .

Solution 9 - Sublimetext

For open a file from the side bar in a new tab, open it with alt+click

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionvernonkView Question on Stackoverflow
Solution 1 - SublimetextLiam CainView Answer on Stackoverflow
Solution 2 - SublimetextfraxelView Answer on Stackoverflow
Solution 3 - SublimetextRaja PariveshView Answer on Stackoverflow
Solution 4 - SublimetextRAMSYView Answer on Stackoverflow
Solution 5 - SublimetextIonicBurgerView Answer on Stackoverflow
Solution 6 - SublimetextSuri13View Answer on Stackoverflow
Solution 7 - SublimetextOmkar SuvarnkarView Answer on Stackoverflow
Solution 8 - SublimetextVIKASH DASHView Answer on Stackoverflow
Solution 9 - SublimetextRiccardo VenturiniView Answer on Stackoverflow