How to always open files on the current Space?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to always open files on the current Space?

Kurt Ruff
I have several desktops ("Spaces" in Apple marketing parlance), typically with a few Terminal and TextMate windows on each.  When I open a file (whether using File > Open… or the `mate` CLI), it often opens a tab in a TextMate window on another desktop, so I have to hunt through my desktops, detach the tab, and drag it back to the desktop I was originally using.

Is it possible to change this behavior, so TextMate always opens the file in a window on the current desktop?

- Kurt

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to always open files on the current Space?

Allan Odgaard-4

On 12 Jun 2017, at 16:55, Kurt Ruff wrote:

Is it possible to change this behavior, so TextMate always opens the file in a window on the current desktop?

Try calling this:

TM_PROJECT_UUID=$(uuidgen|tr '[0-9A-Z]' 0) mate «file»

By setting TM_PROJECT_UUID to the “null UUID” it will create a new project window for the file (rather than re-use an existing window which’s project folder is an ancestor of the file to be opened).

You can of course alias the above so that you do not have to type it each time.



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to always open files on the current Space?

Martin Wilhelm Leidig
Am 2017-06-12 um 21.58 schrieb Allan Odgaard <[hidden email]>:
> Try calling this:
>
> TM_PROJECT_UUID=$(uuidgen|tr '[0-9A-Z]' 0) mate «file»
>
> By setting TM_PROJECT_UUID to the “null UUID” it will create a new project window for the file (rather than re-use an existing window which’s project folder is an ancestor of the file to be opened).

Useful, but shouldn’t there be a semicolon just before “mate”, like this:

TM_PROJECT_UUID=$(uuidgen|tr '[0-9A-Z]' 0) ; mate «file»

(untested)


… mit freundlichem Gruß:

-Moss-
--
Martin Wilhelm Leidig, SatzTeXnik
Dante e. V. #1580





_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to always open files on the current Space?

Kurt Ruff
In reply to this post by Allan Odgaard-4
[Allan] By setting TM_PROJECT_UUID to the “null UUID” it will create a new project window for the file

Marvelous; that's just what I was looking for.  Thanks.

[Martin] Useful, but shouldn’t there be a semicolon just before “mate”, like this:

In BASH, the syntax `A=B C` means that environment variable A is set while executing C.  On the other hand, `A=B ; C` means that A is a local variable which is not passed on to C's environment, so it won't work for this scenario.

[Louis] Thank you again for creating TextMate, I love this editor, and I think I would not be so fond of programming if I hadn't TextMate.

+1!




_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to always open files on the current Space?

Martin Wilhelm Leidig
Am 2017-06-13 um 05.06 schrieb Dr. Kurt Ruff <[hidden email]>:
> In BASH, the syntax `A=B C` means that environment variable A is set while executing C.  On the other hand, `A=B ; C` means that A is a local variable which is not passed on to C's environment, so it won't work for this scenario.

Ah, this is useful, indeed.  Didn’t know that, thanks for spelling that out for me.


… mit freundlichem Gruß:

-Moss-
--
Martin Wilhelm Leidig, SatzTeXnik
Dante e. V. #1580





_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate

signature.asc (817 bytes) Download Attachment
Loading...