Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 - Files not opening a new tab?

Tags:

sublimetext

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.

like image 632
vernonk Avatar asked Mar 02 '12 15:03

vernonk


People also ask

How do I open multiple tabs in Sublime Text?

To do so, you need to press Ctrl+K, then Ctrl+Shift+Up. You can repeat as many times as you like. Press Ctrl+K, then Ctrl+Shift+Up to open a new sub-window.

How do I add a tab in Sublime Text?

If you want to use a tab in search/replace, just type a tab on a new line ("Indent using spaces" disabled), select and cut and then paste into either search or replace field.


3 Answers

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.

like image 64
Liam Cain Avatar answered Sep 21 '22 04:09

Liam Cain


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.

like image 26
fraxel Avatar answered Sep 22 '22 04:09

fraxel


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.

like image 27
Raja Parivesh Avatar answered Sep 23 '22 04:09

Raja Parivesh