Sublime Text 2: open one window and ignore all other windows

I am using Sublime Text 2 on Linux. I use it as the main editor. I have several tabs open during sessions. However, sometimes I just need to quickly open one file without opening all my other files from a previous session.

The default behavior on my system is that a new open file becomes a new tab, except for my previously opened files. However, I want to open only a new file (some kind of viewing in incognito mode), without opening all the other previous files. That is, one tab in one window.

Does Sublime Text support this file open behavior?

+6
source share
4 answers

You can change the user settings hot_exit and remember_open_files to false .

 { "hot_exit": false, "remember_open_files": false, } 
+2
source

Just set open_files_in_new_window to false in preference -> setting, default .

+2
source

It seems that the -n option works the way you want:

 sublime_text.exe -n file.txt 

But the behavior of Windows (not sure what Linux is) is that it creates two instances: one with previously edited files, and the other only with file.txt .

In any case, my own experience: I almost always have at least one instance of ST2 open (I suppose something similar in your case), so in this case it is possible:

  • ctrl+shift+n creates another instance of ST2, and you can open the file in this (empty).

  • If you just opened the file (for example, from the command line without -n ), and the ST2 instance was created not only with the open file, but also with some other previously edited files on other tabs - you can just simply drag the file tab and move it outside. Then a new instance of ST2 is created only with this file (i.e. One tab in one window).

+1
source

I don’t know if this is possible, but you can just drag the tab somewhere in the middle of the screen and leave it. It will open in a new window. Hope this helps.

0
source

Source: https://habr.com/ru/post/951254/


All Articles