4

I am working with different workspaces and I am editing stuff in different ones.

I want to use Sublime for it and I encounter a problem: if I want to open a file in a workspace, I have to use the same open session of Sublime I am using in another workspace.

This is not useful, since they are completely unrelated things and this makes me keep all of them in the same workspace where Sublime was first opened.

Is there a way to launch two Sublime instances?

fedorqui
  • 10,069

2 Answers2

5

I am not sure I get the question correctly, but of course you can.

just press Shift+Ctrl+N to create a new window (or choose File > New window as you mentioned (thanks) ), then press Shift+Ctrl+Alt+ arrow key to move the window to another workspace.

Jacob Vlijm
  • 83,767
  • Oh, this is a bit shameful : ) "File > New window" (or Shift + Ctrl + Alt as you indicate in your correct answer) is exactly what I was looking for. Instead, I was launching the program from the Desktop every time, each one getting into the same instance. Thanks a lot, that was it! – fedorqui Apr 04 '16 at 09:39
  • 1
    @fedorqui Thanks, you wouldn't believe the questions I am about to ask every now and then :). BTW, man pages for sublime text seem to be missing. – Jacob Vlijm Apr 04 '16 at 09:40
  • When launching from the command line, you can also use subl -n – idleberg Apr 04 '16 at 10:00
  • @idleberg indeed, but I didn't mention because it doesn't work all the time. Sometimes it just makes you move to the viewport with the currently opened window. – Jacob Vlijm Apr 04 '16 at 10:23
  • This doesn't work if you want to have the same project open in two instances. It just switches to the first instance when you try to open the project. – mbomb007 Sep 03 '18 at 13:25
1

Using "sudo" add these lines in /bin/subl:

#!/bin/sh
exec /path/to/sublime_text_binary "$@"

And then run:

sudo chmod +x /bin/subl

Now you can use, subl /path/to/folder to open new Sublime text window along with /path/to/folder.

Example:

subl /tmp
subl ./
subl /home
fedorqui
  • 10,069
Disnhau
  • 11
  • 1