11

I attempted to open a large javascript file with TextMate and it is now frozen. I have tried closing and reopening TextMate but it continues to freeze due to the recently opened file. Is there a way to reset/clear the recently opened files in TextMate?

Mike Croteau
  • 1,062
  • 2
  • 16
  • 43

3 Answers3

32

If you open TextMate from the Finder with a double click and hold shift pressed, you will get this dialog:

Disable session dialog

"Disable" will do exactly what you want, "Restore Documents" will continue to restore them.

kwood
  • 9,854
  • 2
  • 28
  • 32
3

Try setting this parameter:

defaults write com.macromates.textmate OakDisableSessionRestore 1
Buddy
  • 10,874
  • 5
  • 41
  • 58
  • 1
    Just for the record: This works, but disables sessions permanently. One would set it to 0 / false afterwards to get the default behavior back. – kwood Sep 09 '15 at 10:46
  • The other answer didn't work for me (textmate 2.0.23, Mac OS Monterey). Thanks – boulder_ruby Feb 07 '23 at 16:32
1

https://github.com/textmate/textmate/blob/master/Frameworks/Preferences/src/Keys.mm

shows the user "defaults" strings to use.

In your/my case (2.0.23 on 12.6.7) use:

  • "defaults write com.macromates.textmate disableSessionRestore 1" to disable
  • start textmate again in CLI "open /Applications/TextMate.app"
  • close app
  • "defaults write com.macromates.textmate disableSessionRestore 0" to re-enable default behavior
  • open app again
REP
  • 11
  • 1