Hi Allan,
Thanks for the help, I've made some progress:
On 12 Mar 2021 20:25:52, Allan Odgaard via TextMate wrote:
The default is the setting of Preferencs → Projects → File browser location.
Yes! That solved the problem with untitled windows (but not not all windows, see below). I set the default file browser location to ~/tmp/ and now opening random files now does not open in untitled windows.
For me, when I open a new untitled window, it does show this location in the window title. Perhaps you have set windowTitle somewhere?
Oh yes, indeed, I had set windowTitle = '$TM_FILEPATH' in my ~/.tm_properties file.
As for why untitled windows have a default project folder: Internally there is no distinction, i.e. each window is a project
That makes sense. Now that I've removed my custom windowTitle variable, I can see that untitled windows are using the project folder of ~/tmp/, as it is my default.
Though the behavior you experienced is unexpected, so I will reconsider if there should be exceptions.
Thanks, I think this is worth reconsidering because the expected behavior can still be bothersome: Although opening random files no longer creates tabs in untitled windows, they still do become tabs in open windows which have a file browser location set to an ancestor of the newly opened file. For example, I had my ~/.tm_properties file open (which has a file browser location of /Users/me/). Then I opened the file ~/src/projectX/randomfile and it opened as a tab attached to the ~/.tm_properties window. That is unexpected, because ~/src/projectX/ is a project with its own .tm_properties file; I would expect any files open from inside projectX to open in its own window, with a file browser location set to ~/src/projectX/.
Can we have a setting where opening a file always spawns a new window, unless a .tm_properties file exists in a directory ancestor to the location of the opened file (ignoring ~/.tm_properties because it is an ancestor to virtual all files)? That would solve this for me.
Thanks again! Quinn