Sublime Forum

Can I discard all opened folders and open just one new window in cli?


I usually open a folder in sublime from command line by

subl [folder]

However it will recover previously opened folders and open 2+ windows.
It makes sense but sometimes I just want to forget all previously opened files and start a new window at some where.

Can you add a new option to the subl command like --discard-all to prevent open these files?



You can disable hot exit in settings. Adding a --discard-all option would be extremely dangerous as it would result in losing any unsaved files.