+4

add command-line switch to just open new window without reloading recent docs

gour 7 years ago • updated by Roy Ivy III 6 years ago 1
At the present moment subl --new-window filename
opens SublimeText editor with a new window, but also reloads recent files with the
"remember_open_files": true
settings active, which prevents user to e.g. use ST2 to just edit a file in single-file-session and still have ability to reload recent files when desiring to work in e.g. 'multi-files' or 'project' mode.

Having separate option to have clean session for single file is useful for quick & dirty editing or in situations like when one wants to use ST2 as external editor for the mailer.

In my case, I'd like to use ST2 everywhere and it means to replace gvim in my Claws-mail mailer, so that in the field for 'external editor' I can replace my current:
gvim "+set ft=mail" -f %s 

setting with something like:

subl --new-clean-window %s

I believe that most of the functionality is already built-in and it just requires small tweaking.

I'd recommend using '--new-instance' for this flag. It's seems more accurate as we're requesting a separate running instance of ST2. Additionally, you might need a second flag '--no-remembered-files' to implement this fully and cleanly.

I'd really like to second this request as I currently use ST2 as the editor for GIT and HG. I can obtain almost correct behavior for merging, editing commits, etc, by using:
sublime_text.exe --wait --new-window %S
This works, as I said, _almost_ correctly. When I close the resultant window, control returns to the command line as it should _unless_ I have ST2 wasn't already running and ("remember_open_files": true). If that's the case, then, I must exit the program to get return of control to the command line. It'd would be easier and much more consistent if I could open a new separate instance which doesn't open remembered files and which is always closed with "File / Exit". This would be my preferred syntax:
sublime_text.exe --wait --new-instance --no-remembered-files %S
Thanks for your attention.