[TxMt] Re: How to put the cursor at the top of a document

Ryan Fitzer ryan at ryanfitzer.com
Fri Feb 12 19:09:46 UTC 2016


> Just for the records, calling "$TM_MATE" with e.g. a --line argument w/o a file path will work on current file even when that file is untitled.

Is the “$TM_MATE” supposed to be accessible as an env var to scripts
outside of Textmate bundles? The way I read this thread is that it
was, but I get nothing when opening a new shell and running “echo
$TM_MATE”. I have the shell support installed and have `export
EDITOR="/usr/local/bin/mate -w”` in my .bash_profile.

Ryan

On Fri, Feb 12, 2016 at 4:40 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
>
> On 11 Feb 2016, at 5:56, Koen Punt wrote:
>
>> In the "Bundle Support" bundle in Support/shared/lib/textmate.rb there's a
>> go_to function, which uses the txmt:// protocol for the current file, or when
>> a path is supplied it uses the mate cli.
>
>
> Just for the records, calling "$TM_MATE" with e.g. a --line argument w/o a file path will work on current file even when that file is untitled.
>
> This is a “new” feature (2.0) and the go_to function hasn’t been updated to take advantage of this, thus it still falls back on txmt: for untitled files, but using "$TM_MATE" is more robust since a few other applications can claim the txmt: URL scheme.
>
> Also, the path to the mate shell command is exposed to bundle items via the TM_MATE environment variable, so going via a shell interpreter it can be reached with: "$TM_MATE".
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate


More information about the textmate mailing list