Whilst preventing TextMate from opening non-supported files is welcome (change in b4):
TextMate will only open files from the project drawer if their extension is found in the Info.plist, or if they have no extension (hidden files like .htaccess are considered to have no extension).
This now prevents me from running commands on the file selected in the project drawer, as $TM_FILEPATH is the frontmost _open_ file. (I have a 'Test Movie in Flash' command as part of my ActionScript bundle, now broken, to be run on .fla files in my project). Any chance you could add another variable, e.g. $TM_SELECTEDFILE or something, so we can access these?
Also, why not allow these non-supported files to be opened by the Finder when double-clicking them? And having a Open with Finder command as well as a Reveal in Finder command?
On 15. Oct 2004, at 8:27, Rob Bevan wrote:
This now prevents me from running commands on the file selected in the project drawer, as $TM_FILEPATH is the frontmost _open_ file. (I have a 'Test Movie in Flash' command as part of my ActionScript bundle, now broken, to be run on .fla files in my project). Any chance you could add another variable, e.g. $TM_SELECTEDFILE or something, so we can access these?
Yes, I wanted to have included this in b4 (since I know of your usage ;) ) but I wasn't entirely sure how to best do it.
There can be several selected files, so it would be TM_SELECTED_FILES, but should that be an "array" or a ; separated list? and if it's a list, should I escape spaces etc.?
That said, I think there will be both TM_SELECTED_FILES and TM_SELECTED_FILE, where the latter is just the first selected file, since most of the time, that's what you want to use, and having to "parse" a ;-delimited list to get the first filename will probably quickly turn boring...
Also, why not allow these non-supported files to be opened by the Finder when double-clicking them? And having a Open with Finder command as well as a Reveal in Finder command?
Ah, I can add that. Also, there should be an "force open as ascii".
Kind regards Allan
On Oct 15, 2004, at 9:21 AM, Allan Odgaard wrote:
That said, I think there will be both TM_SELECTED_FILES and TM_SELECTED_FILE, where the latter is just the first selected file, since most of the time, that's what you want to use, and having to "parse" a ;-delimited list to get the first filename will probably quickly turn boring...
This sounds like a good solution.