News for hackers. Stuff that matters.
Re:Sublime Text 3.2 Released by verall on Wednesday March 13, 2019 @05:00PM (#19383714)
Can we get a true "one-shot-file-edit" command line switch, that bypasses hot-exit, without disabling hot-exit?

For example I want to use sublime for git commit message. I juggle large repositories, and so I use about 3-4 different sublime windows open on folders that keep my work context.

If, while these windows are open, I call `subl -w -n filename`, sublime re-opens all already open windows, and also opens a new window. It then blocks the terminal until every sublime window is closed.

I don't want to disable hot-exit, but sometimes I want a self-contained subl window for just 1 file.

Anyone have any ideas?

Re:Sublime Text 3.2 Released by philippotto on Thursday March 14, 2019 @01:28PM (#19391402)
I had the same problem (once in a blue moon, sublime did the correct behavior, but overall it was pretty unreliable).

As a solution, I wrote a small ST package [1] which produces the desired behavior. The package listens on a socket to "open-file-requests", which can be issued from the command line.

Via bash aliasing, you can invoke something like `lsub myfile.txt` which will then do what you want.

However, I'm not too sure about whether it works for git, as it's probably not blocking (I didn't test it for this usecase). Maybe it's still useful for someone, though.

[1] https://github.com/philippotto/LocalSubl

Re:Sublime Text 3.2 Released by erikpukinskis on Wednesday March 13, 2019 @07:53PM (#19385201)
You could keep an older version of sublime around just for git commits.