+15

Please: Opening Textastic without a file reference should open an empty document, not a "open" dialog!

Roberto Valerio 11 years ago updated by Stephan Sann 10 years ago 6 1 duplicate

Please have a look at Sublime Text 2. I open the app to start typing, I do not want to click "new document" on a file selector first. 

Duplicates 1

You can just use File -> New or Cmd-N and the Open dialog will close. 

Well, most text editors got a different behavior (opening a blank file) - there's a reason for that :) 

This was actually a change in Mountain Lion for apps that support iCloud. Other iCloud-enabled apps like Apple's TextEdit, Pages or Numbers or third party apps like Byword and iAWriter have the same behavior. 


Here's the relevant part of the Mountain Lion AppKit Release Notes (https://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKit.html#//apple_ref/doc/uid/TP30000741):


NSDocument Support for iCloud
In 10.8, NSDocument-based applications with a ubiquity-container-identifiers entitlement gain new functionality and UI to facilitate iCloud document management.
When iCloud is enabled and an application is first launched or re-activated and no windows are visible or being restored, instead of creating a new Untitled document, NSDocumentController will display a non-modal open panel showing the user's iCloud library. From there an application can either open an existing document from iCloud or the local file system, or create a new document. 

You can press Cmd-N to create a new document even when the open dialog is shown.

Well - isn't it possible to subclass the NSDocumentController and override the default behavior?

Anyhow one can disable Textastic in "System Preferences...|iCloud|Documents & Data (Options...)". This will open Textastic with an empty document.

For me switching off iCloud is not desirable so I found this workaround:
- Create a shell-script somewhere with this single line: "open -t `mktemp -t txt`"
- Create a keyboard-shortcut (like I recommended here: http://www.productivity.ninja/2014/06/18/shortcuts-on-speed/)

(will require to configure Textastic as the default text editor)

It's not a perfect solution, since with stupid auto-save you cannot "save as..." (you have to duplicate first, or you will save the temporary file). Anyhow most of the time I just need a place to store / edit some text, so it's okay for me.

It would be soooo good if one could switch of auto-save (*wink-wink*, Mr. Blach). Not only for the workaround. I do not like auto-save for text-files at all...
Giving this thing a second thought, there is yet another way to do it: Automator!

Just created this workflow:



And there's also a workaround for the "save as.."-problem:




In case you didn't know: You can save the workflow as an .app-file (so you can create a shortcut to it as I wrote before).