Whether I'm in a Single or 2 Column mode, I am only able to have 2-3 open files (tabs) per window.
When I hit what appears to be a limit, attempts to open a file (by clicking in Sidebar View) will replace an already open file.
Is there a setting I can change or have I hit a working-as-designed limitation?
Environment:
Sublime Text 3 Stable Build 3103
OS X (El Capitan) 10.11.4
BTW: If I use File Open it does not appear to have the same problem as I can open may files that way.
When you open a file from the sidebar with a single click, its tab will only remain open, if you edit or save the file. If you want the tab to stay open, double-click on a file in the sidebar.
You can override this default behaviour in your settings:
{
"preview_on_click": false
}
Related
I'm using MacOS 10.12.
I open a folder in Sublime Text 3 and I click a file.
The file then appears as a tab on the right side.
If I don't edit it and try to open another file, the previous one will be replaced by the new file.
My question is: how do I open the second one without having to edit the first one?
For now, my solution is to press a blankspace and delete it in the first file (so nothing changes here). And then open the second file.
This is annoying, and I figure there might be a better solution for this.
Thanks in advance.
By default, the following preference is set:
// 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,
This means that a single left click on a file in the sidebar will open a preview/transient tab. Single left clicking on another file will replace that tab with a preview of the new file. As you have noticed, editing the file in some way will convert the tab from a preview to a persistent tab. Setting this preference to false will mean that single clicking will do nothing. There is currently no option to get the file to open in a persistent tab from a single click.
Regardless of this preference, double left clicking will open the file in a tab that will stay.
Although Sublime is a really powerful text editor but I am facing an issue. I have been using sublime text editor to view logs of my application.Suppose I have already opened file in my editor. After the logs are modified by the app server.
Sublime doesn't give any popup like we get in other editors
Example:
NOtepad++ says:
Also it doesn't modify the file. I have to close the file explicitly and then I re-open the file to ready the modified logs.
Only options i get in my sublime preferences are :
Please help..!
You are using an extremely outdated version of sublime (1.4). You can enable this functionality by upgrading and performing a small settings tweak:
Download the new SublimeText
Install it and open it
Go to the preferences menu and select "settings"
This will open the settings files for sublime, scroll down to line 349 on the left panel and copy that line.
Paste in the copied line into the right pane and replace "false" with "true"
Save and restart SublimeText
This should fix your issue entirely while also upgrading you to the awesome new SublimeText :)
Happy coding!
Set the following setting to true.
Menu > Preferences > Settings
// Always prompt before reloading a file, even if the file hasn't been
// modified. The default behavior is to automatically reload a file if it
// hasn't been edited. If a file has unsaved changes, a prompt will always
// be shown.
"always_prompt_for_file_reload": true
When I click the file I want to open in Sublime, it is replacing the current tab I have open. It used to open it in a new tab.
This is because you were only previewing the previous file. If you click on a file once in the sidebar, by default it opens in preview mode. Clicking another file will open it in preview mode, in the same tab. You can disable this behavior by double-clicking the file in the sidebar, by beginning to edit the file, or via the user settings: select Preferences -> Settings-User and add
"preview_on_click": false,
then save the file. With this new behavior, you will need to double-click on a file in the sidebar to open it, and it will not close if you double-click another file.
Preferences -> Settings-User -> "open_files_in_new_window": false
Open Registry Editor (The easiest way to do this in all versions of Windows is to open the Run dialog box via WIN+R, and enter regedit)
go to :
Computer\HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command
change it from :
"C:\Program Files\Sublime Text 3\sublime_text.exe" "%1"
to :
"C:\Program Files\Sublime Text 3\sublime_text.exe" -n "%1"
You can use a simple python script to get files to open in a new tab with a single click.
import sublime
import sublime_plugin
import os
class NoPreview(sublime_plugin.EventListener):
def on_load(self, view):
if (os.path.exists(view.file_name())):
view.run_command('save')
Save this script with a .py extension in your sublime packages directory.
(Usually ~/.config/sublime-text-3/Packages/User in Linux)
Note: Make sure "preview_on_click" is set to true in Preferences > Settings, otherwise this will not work.
You can simply go to preferences/settings/preferences.sublime_setting.
Under this, after font-size(array), paste this "preview_on_click": false.
And you are done!
Note: After this, you have to double click to open any file.
On single click you preview the files. You can double click on the file to open them in a new tab.
You must be having "show tabs" unchecked under the VIEW tab. Check it and you can open a file with a double click.
I'm looking for a way to delete from the system (not just remove from the opened session) a given file, within Sublime 3 (3103).
The file in question is opened in Sublime, and shows in the sidebar in a Group.
I've installed the Sidebar Enhancements but this only adds the option, in the context menu, to delete a file that is opened within a Folder.
For files in Groups, right clicking on its name in the sidebar only shows the options: Close, Close Others, Close Others Below, New File, Open File.
Is there some way of performing this rather simple task that I might be missing?
Try:
TabsExtra
It gives you the ability to delete files from tab right-click menus.
Today my Sublime 3083 became corrupted! I don't know why but every time I click on a file it opens on the same tab!
I cannot open two tabs at the same time. Fist file opens in a new tab and another opens in the previous tab and so on!
I did not installed any plugins recently. I just selected "Close Other Tabs" on menu.
What can I do?
Thanks
You must open the file using double click. If you open it using single click then you're using a feature called file preview, and that file will be closed when you preview other file unless the file has changes.
In addition, in the settings file you can set the preview_on_click option to false to disable the preview option; if you do that a click on the file won't do nothing, and a double click will still open the file in a new tab. As far as I know there's no option to open the file with a single click, only you can 'preview' the file (it's similar to open but the file get closed if you preview another file). Example setting:
{
"preview_on_click": false
}
I was facing a similar but little different problem. I was not able to view any tabs I was opening, and it was always opening a new file.
I fixed it by "View" -> "Show Tabs".