Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime - Close file without saving

This has been bothering me for ages.

In Sublime, I know cmd+W will close a file but how do I toggle to the "Don't Save" option if I just want to close a file without saving?

enter image description here

like image 286
mikelovelyuk Avatar asked Mar 21 '16 09:03

mikelovelyuk


People also ask

How do I close Sublime without saving?

Kill sublime if it's open: press WindowsBtn+R and enter taskkill /F /IM sublime_text.exe Next time you open up Sublime, a single empty window will show. Process is probably similar for other OS too. Save this answer.

What is closing without saving?

If you just select Close, the program stops using the file but does not save any changes. It may mean you want the program to work with a different file. If you have not yet done a Save, the program may remind you and ask if you want to save it first.

Does Sublime save automatically?

People often forget to save files (I've been guilty of it myself), autosave will make sure your files are saved, even if you forget. This is especially important for code since any changes you make to your code will not be shown until your file has been saved (sometimes you might also need to restart your server).

How do I close a window in sublime text?

Cmd-shift-w closes the whole window.


2 Answers

Press cmd-'d' (the d stands for for Don't)

like image 189
Bart Gloudemans Avatar answered Oct 16 '22 00:10

Bart Gloudemans


For mac, try:

  1. quit the application (CMD + q)
  2. remove the local sublime session with:

rm ~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session

  1. restart Sublime
like image 32
Dylan O'Carroll Avatar answered Oct 16 '22 02:10

Dylan O'Carroll