Sublime Forum

Turning off ability to view same file in multiple tabs

#1

I downloaded ST3 on Windows. The problem I have is with the following scenario:
I have file foo.bar open in a tab. I enter ctrl-shift-f to search multiple files for a text string. In the Find Results tab, I select a result from file foo.bar and click on it. What happens is that a second tab with file foo.bar opens.

What I want to happen is that the existing tab with file foo.bar moves to the fore. This last behavior is what I get when I open up the same file from an external application, say File Manager or Perforce, when it’s already open in ST3. In this case, ST3 does not create a new tab with the same file; it just moves the tab with the existing file to the fore. It has been very difficult to research this topic online because it turns out many people actually desire to have the same file open in multiple tabs at the same time. I don’t. I always want ST3 to display the tab with the existing file.

Is there a way to configure this?

0 Likes

#2

I think that should work the way that you want it to, or at least it does for me and I’m not aware of a setting that would change it.

Something to check would be to see if the full path to each file is exactly identical as far a Sublime is concerned, including case (even though that shouldn’t matter). I have a vague recollection that some recent changes have made it case sensitive in a way that causes it to think it needs to open another file when it doesn’t, but I’m having trouble finding the issue on the tracker so I may be mistaken.

My recollection was that even a case where a filename was otherwise the same but the case of the drive letter was different was enough to cause a redundant file open.

0 Likes

#3


1 Like

#4

Yes, that was the problem. The case of the folder names used in the path search in the Where clause of the Find in Files… command did not match the case of the actual folder names defined in Windows. Therefore when a find result was clicked on, ST3 thought it was a new file, and opened it in a new tab. I’ve changed the cases in the Where clause to match what I have in Windows, but given that Windows is case–insensitive, I would think ST3 should be as well for the Windows version.

0 Likes