Hello,
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?
2. How can I deliberately open two textmate windows of the same file? This is a very useful feature to have available. I hadn't realized it was a feature of textmate until the above behaviour happened.
I am using Textmate 2 (specifically 2.0-alpha.9543) on OSX 10.9.2.
Many thanks. Apologies if this message is a duplicate (an email problem).
Geoff
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.
- 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).
- 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.).
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@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.
- 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).
- 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.).
I have observed this same behavior while working on my dissertation. It didn't happen all the time, but when it did occur, every instance of clicking in skim would result in a new window opening in TextMate (rather than jumping to the line in the already open file, or opening a new tab in the project window). Unfortunately, I was more concerned with finishing the dissertation than figuring out the cause of the behavior.
The project was located in my Dropbox folder and version-controlled with git. No rebasing or stashing occurred, just new commits every couple of days.
I'll try to look into it the next time it occurs; maybe I can figure out what causes it, or at least figure out when it stops.
Dustin Wheeler mskblackbelt@me.com
On May 19, 2014, at 3:09, Geoff Vallis gkvallis@gmail.com wrote:
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@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.
- 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).
- 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.).