by verall · 7y ago · 0 comments
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?
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.