xxxxxxxxxx
Save this in your User directory and create a keybinding. Be careful when choosing how you call this, you don’t want to accidentally delete everything.
{"keys": ["ctrl+shift+q"], "command": "close_without_saving"},
import sublime
import sublime_plugin
class CloseWithoutSaving(sublime_plugin.WindowCommand):
def run(self):
window = self.window
for v in window.views():
if v.is_dirty():
v.set_scratch(True)
window.run_command("close")