Sublime Text open project file in existing window - sublimetext3

Whenever I double click a sublime project file on my Windows 10 machine, it opens a new windowed instance of sublime text.
How can I have the double click project open in the existing sublime window, replacing any open project.
"open_files_in_new_window": false, does not have any affect on opening projects.

With the Sublime Text project file open as a project, on the main menus go to: Project -> Edit Project and the .sublime-project file is opened as a text file for editing. Seems to apply settings to the open project when the file is saved.

Related

Open in Editor in Sublime Merge

https://www.sublimemerge.com
I see there is an option on Sublime Merge, right-click file and Open in Editor..., that will open the file in the default editor (sublime text here).
However sometimes I prefer to open files on QtCreator.
How can I have multiple editors on Sublime Merge? And then choose which one to use while opening a file.

Sublime text editor doesn't auto-refreshes the file if it is modified by another program

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

How do you make Sublime Text 3 open a file in a new tab instead of opening it in the current tab?

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.

Can't open multiple files in Sublime Text 3

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
}

Is it possible to pin the project into folder panel in Sublime Text 3?

Updated: Probably, my question doesn't make sense. Could you please close it?
I am quite new to Sublime Text. I open my project by dragging and dropping my project folder into Sublime Text.
However, when I quit Sublime Text, and reopen it, my project is gone. I need to drag and drop again. Is it possible to pin my project into Sublime Text, so the next time when I open, my project is still there?
Thanks.
Note: I am using Sublime Text 3
You can save your project on disk: Project > Save Project As... When you open your editor next time it should open automatically. If not, go to Project > Open recent.
Documentation: https://www.sublimetext.com/docs/3/projects.html
Set "hot_exit": true in preferences
Exiting the application with hot_exit enabled will cause it to close
immediately without prompting. Unsaved modifications and open files will
be preserved and restored when next starting.
Closing a window with an associated project will also close the window
without prompting, preserving unsaved changes in the workspace file
alongside the project.

Resources