Thomas Denney

Prevent TextMate from resuming its state

TextMate is currently my favourite text editor, however the other day I tried opening a very large (~0.5GB) text file and TextMate ground to a halt, so I force quit it. Unfortunately, the next time I opened it I found that it kept trying to open the same file. Eventually, even after deleting the file completely, I managed to find a solution.

As well as its main preferences pane, there are a few additional preferences that you can set via terminal, and one of these prevents TextMate from opening the set of files it previously had opened. Run the following command in order to do so:

defaults write com.macromates.textmate OakDisableSessionRestore 1

Voila! The next time I opened TextMate I was able to open up a blank document, which solved my problem :).