[TxMt] Re: Duplicate textmate windows of same file.
Geoff Vallis
gkvallis at gmail.com
Mon May 19 08:09:02 UTC 2014
I can't reliably reproduce the behavior. I tried this morning but could not. However, when it does occur it occurs frequently. There is no version control, no git, rebate or stash. And no symbolic links.
It seems to occur when I have a project open (i.e., several latex files in the same directory) in one window, with tabs, and when I also have another project open, again with tabs. Then, sometimes (maybe 1 in 10 times), when I open a another source file using 'mate', it opens in the 'wrong' window - i.e. not in the same window that the other files in that directory are in. Then, when I click on the Skim window, it opens a duplicate version of the file in the other window. If I then close that window, and click again on skim, it again opens a duplicate, every time. That is, once I am in the situation in which it occurs, it reliably occurs again. The behavior only seems to occur when I have two windows with tabs open, but not always then.
The behaviour also occurs on two computers. The computers are linked, in that the directories ~/Library/Application Support/Avian and ~/Library/Application Support/Textmate are synced by BitTorrent Sync (which is like Dropbox).
Geoff
On May 19, 2014, at 1:38 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
> On 16 May 2014, at 22:15, Geoff Vallis wrote:
>
>> I use textmate a lot for latex, with skim as the PDF viewer, and I have set it up so that I can sync between skim and textmate. However, sometimes when I shift-command-click on a skim window, in order to go to the corresponding place in the textmate window, textmate opens a new window of the source file. So I then have two windows of the same source file open in textmate. When I change one window it instantly changes the other, so they remain in sync. This is a useful feature sometimes, but not all the time. So I have two questions.
>>
>> 1. How can I stop this happening when using skim, so that focus just goes to the already-open textmate window?
>
> It shouldn’t happen in the first place.
>
> How often does it happen? Like most of the time, one in ten, one in hundred? Is any symbolic links involved? Are the files version controlled (specifically git) and if so, do you use features like stash and rebase?
>
> I am aware that when using git, git will often rewrite a file with a new inode, which can cause TextMate to see the newly written file as different from the old one. But in this case, the files do not act as synced in TextMate (as TextMate thinks they are different files).
>
>> 2. How can I deliberately open two textmate windows of the same file? […]
>
> For now, this isn’t a supported feature. While it can (based on your email) happen, it is not something I have tested, so there might be code in TextMate that can’t properly deal with this (e.g. properly updating caret/selection in all open windows when using undo/redo, etc.).
More information about the textmate
mailing list