Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

"subl -n -w foo" start two windows instead of the single one I want #28

Open
mburr opened this Issue Apr 29, 2013 · 2 comments

Comments

2 participants

mburr commented Apr 29, 2013

(Note: this bug also applies to ST2)

If ST3 is not running, the command:

/opt/sublime_text/sublime_text -n -w foobar

will start two windows - one with the "foobar" file opened in a new window (as desired and specified by the command line options) and one with the previous set of files that were opened when ST3 was last running.

This is with a fresh, new installation of ST3 build 3030, on a Linux Ubuntu 12.04 LTS box that has never had ST installed on it - so whatever preferences are set by default are in effect.

My intentions are to use the "-n -w" options in a script so I can get normal behavior when ST is specified in the EDITOR environment variable so that git or subversion (or whatever) can invoke ST3 as the 'system editor'.

(similar behavior occurs if the -w option is omitted).

This problem is discussed in the ST forum at http://www.sublimetext.com/forum/viewtopic.php?f=2&t=11293

Owner

FichteFoll commented Apr 29, 2013

I think this issue is more about ST's default bhaviour when run from the command line with "remember_open_files": true and no open window. The userecho ticket Add '--new-instance' and '--no-remembered-files' command line options, which is also linked in the forum thread, suggests the addition of new command line options which seems more useful to me (hence the enhancement label).

Plus, when ST has been started with --no-remembered-files it could just not remember the files of this session (maybe with some notice on the top or something) which would make it work exceptionally well for this purpose as both a quick editor and the editor it already is.

Owner

FichteFoll commented Mar 12, 2015

Image/video from the #617 duplicate:

img

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment