2012-07-18 49 views
1

如何配置崇高2自动保存文件,我关闭?它应该像用户打开文件,进行编辑,关闭文件,并且编辑会自动保存,即使用户没有手动保存编辑的文件。崇高 - 如何保存文件关闭自动

这很接近,但我希望它保存文件关闭而不是失去焦点。

http://docs.sublimetext.info/en/latest/reference/settings.html
save_on_focus_lost

+0

为什么你接受提示的答案,因此不会自动保存文件? – barlop 2013-11-06 14:19:44

回答

4

你想只是一个被关闭时或在奇迹般地保存文件时所有打开的文件(窗口)被关闭?在第一种情况下,我建议将每个文件打开到SublimeText2的不同窗口中。

在你正在寻找hot_exit第二个场景:Preferences.sublime的设置

// 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. 
"hot_exit": true, 

除了remember_open_files你可以在退出时自动保存和选择这些文件是否被打开下次。

+1

但将hot_exit设置为true是DEFAULT,不会更改任何内容。它。设置“hot_exit”:false,不会自动保存,它会提示。并且将remember_open_files设置为true或false并不会影响它提示的事实。所以,不是自动的。 – barlop 2013-11-06 14:21:33