6

I was working with Notepad++ on Windows, and now I use Mac. So, I can no longer use Notepad++, and I switched to Sublime Text 3.

In Notepad++ there is a feature that I used with unsaved files. When I closed the application, it did not require that the files were saved, and the unsaved files were reopened when I opened Notepad++ again.

With the default configuration in Sublime Text 3, I don't see that feature. Is it supported in Sublime Text 3? If it exists, how to configure it?

1

2 Answers 2

6

I believe you're looking for the hot_exit setting.


Since I'm running Sublime Text 3 (Build 3126), in Windows 10 Pro, I can't say for sure if this will work exactly the same for you, but the steps in Windows are as follows:

  1. Click Preferences -> Settings

  2. In the new dual-pane window that opens, the tab on the right is labeled Preferences.sublime-settings-User. If that file does not contain any text, just paste the following, save the file, and close it:

    {
        "hot_exit": true
    }
    

If that file already contains text, either change the value of the existing hot_exit setting from false to true, or add the "hot_exit": true line above (without the curly braces). Use commas to separate that line from the lines immediately before and after it. For more information on working with Settings in Sublime Text 3, see the documentation.


Here's the full description of the hot_exit setting, from the Preferences.sublime-settings-Default file (which should not be modified, that's why the above-mentioned Preferences.sublime-settings-User file exists):

// 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.
8
  • hi, I apply your solution and see that you I quit sublime the file save and restore when I turn on but if I use close button it still show dialog save. Can I add that feature (I want to when I use close button of sublime it close and no dialog, save all file working)
    – phongvan
    Commented Oct 29, 2016 at 6:49
  • I'm sorry, but I don't understand what you're asking. Can you rephrase the question?
    – MJH
    Commented Oct 29, 2016 at 6:52
  • if I quit program file save and restore but I close window it show dialog save. I don't want to show the dialog (same with notepad++). Sorry for my English.
    – phongvan
    Commented Oct 29, 2016 at 6:54
  • What action are you taking to "quit program file", and what action are you taking to "close window"?
    – MJH
    Commented Oct 29, 2016 at 6:59
  • 1
    Hi, there are something difference between Mac and Window, on Mac when I close window the program not exist. Thanks for your answer.
    – phongvan
    Commented Oct 29, 2016 at 7:13
1

instead of clicking on red close button, right click on dock and quit the application. It will preserve the unsaved files

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 1, 2023 at 22:01
  • This is what i was looking for. Thanks @user1777660 Commented Nov 5, 2023 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .