Sublime Forum

Open new files in the same window

#1

I generally edit files on the server, using Transmit to open them directly in Sublime Text. Upon saving them, Transmit recognizes that the file has changed and automatically uploads it. Therefore, I don’t have much use for the “Project” feature. Instead, I’d like to be able to open all new files in the same window. As it currently stands, all files open in different windows.

I’d basically like to have a single window, as well as a sidebar that lists all these open files. It would also be nice to have a keybinding for cycling through these open files. Or can something like this aleady be approximated?

0 Likes

#2

You can use the open_files_in_new_window global setting for the former, and take a look through the File/Switch File menu for the latter

0 Likes

#3

beautiful. thx

0 Likes

#4

That is for OS X users only, is there a way to do it in Linux?

0 Likes

#5

This is the default behavior in Linux, as long as single instance support is enabled. You can check this by running Sublime Text from the terminal, and seeing if it prints any error messages at startup.

0 Likes

#6

Under Linux, (Ubuntu 12.04), when sublime is invoked from the command-line, files and directories are always opening in new windows, as opposed to the previous behavior where they were added to the current project in the existing window.

I am seeing no errors/warnings printed in the console from which I’m invoking Sublime.

0 Likes

#7

[quote=“strags”]Under Linux, (Ubuntu 12.04), when sublime is invoked from the command-line, files and directories are always opening in new windows, as opposed to the previous behavior where they were added to the current project in the existing window.

I am seeing no errors/warnings printed in the console from which I’m invoking Sublime.[/quote]

Just an FYI: Despite the OS/X caveat, "open_files_in_new_window": false seems to enable the desired behavior, at least on my system: Ubuntu 11.04 32bit, Sublime Text version 2.0.1, build 2217.

Prior to setting it to false, Sublime Text would open a new window each time I started it from a shell. Now the target files open in the same window as my other files, but in a new tab.

0 Likes

#8

I’m using latest build (3083 on OSX) and new windows are open all the time.
I do have “open_files_in_new_window”: false in my settings, but still.

Also, looks like I can’t modify the default settings, and the override seems to not work.
Do I’m missing something?

Thanks.

0 Likes

#9

Set the settings in your User settings file. Preferences → Settings - User.

0 Likes

#10

Yeah, already did that. Still the same.

0 Likes

#11

I’m using Ubuntu 14.04 and whenever I open a new folder in Sublime Text 3 it opens in new window. I tried to fix it by doing “open_files_in_new_window”: false in my settings, but it is not working.

Also, in the comment of default settings it writes

// OS X only:

How to fix this in LINUX ?

0 Likes

#12

You do realize the setting is for opening files, right?

0 Likes

#13

@FichteFoll
Yes initially I was assuming that too but on some forums they were saying same goes for folders too.

0 Likes

#14

For Linux, simply add this alias to .bashrc

alias subl=‘subl -a’

0 Likes