29 ms·
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 commi
by verall 8y ago
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?
- erikpukinskis 8y agoYou could keep an older version of sublime around just for git commits.
- philippotto 8y agoI 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 https://github.com/philippotto/LocalSubl