Sublime Forum

Open new file in new window?

#1

When I have a single file open (i.e. not using the file-browser sidebar) and I press command-n to make a new file, Sublime Text 2 opens it in a new tab in the same window. I’d like it to default to opening in a new window. Is this possible? I tried changing “open_files_in_new_window” to false, but that only affects opening existing files, not creating new empty ones.

I’d also prefer that creating new files from a project window (i.e. a window with the file-browser sidebar) still create new tabs when I press command-n. (Why? If I’m working with a directory and create a new file, I probably want it to be in that project. But if I’m working with a single file and create a new file, it’s probably unrelated and should be in its own window!)

Thanks for any help, Sublime community!

2 Likes

#2

[ctrl]+[shift]+[n]

ST2
You can set it in like this { "keys": "ctrl+shift+n"], "command": "new_window" } (don’t forget coma at the end if it’s not the last line), in Preferences/Key Bindings Default.

ST3
it’s in …/… user

2 Likes

#3

Thank you! I’m smacking my head for assuming that this behavior was controlled by a preference. Of course I can fix this with key bindings. I even wrote out the commands I wanted to use in my initial post!

For what it’s worth, I put my settings in Key Bindings - User so they’re easily portable to other computers. Here are my settings:

{ "keys": "super+n"], "command": "new_window" },
{ "keys": "super+shift+n"], "command": "new_file" }

I prefer the opposite of Sublime’s default. Command-n makes a new window, command-shift-n makes a new tab. Great!

1 Like

#4

Have there been any updates in version 3?

1 Like