[TxMt] Re: make mate behave like TM itself when opening folder

Allan Odgaard mailinglist at textmate.org
Mon May 11 01:13:12 UTC 2020


On 4 Jan 2020, at 11:23, Matt Neuburg wrote:

> When I say (in ruby)
>
>     `"#{ENV['TM_SUPPORT_PATH']}/bin/mate" '#{p}'`
>
> where p is the pathname of a folder, what appears in the project 
> browser is that folder plus (hierarchically down from it) all its 
> contents.
>
> But when I open a folder using TextMate, directly, what appears in the 
> project browser is just the contents of the folder; the folder itself 
> is not in the project browser.
>
> How can I make the former (`mate`) behave like the latter (TextMate 
> itself)?

I think what is happening here is that at one point, you opened `folder` 
and then navigated to parent folder (in file browser) and closed the 
window.

The problem is that TextMate stores “state” for each folder, this 
includes file browser location.

So now when you open `folder` it restores the state, where file browser 
is actually pointing to a parent folder.

I realize in this situation, it will be confusing, and should improve 
this.

For now, try open your folder via `mate` and then select File Browser 
→ Project Folder (⇧⌘P). Does that bring you back to the expected 
folder?

If you close window and re-run `mate`, I think it should then behave as 
expected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macromates.com/textmate/attachments/20200511/f036592a/attachment.html>


More information about the TextMate mailing list