+3

Equivalent of mate_wait for subl

Stuart Roebuck hace 12 años actualizado por Sean Tan hace 12 años 1
Sublime Text 2 can be invoked from the command line with `subl` and there is an option `-w` which enables it to wait until the file is closed and then return it so that ST2 can be used as an editor for command line executables that call upon an `$EDITOR`.

However, setting `EDITOR` to `path/to/subl -w` doesn't work for some commands like `crontab` that expect the editor to be just a path to an executable.

TextMate solved this by allowing you to create an alias to `mate` with the suffix `_wait`, e.g. `mate_wait` which would be executed as if the `-w` option had been used.

It would be great if Sublime Text 2 could also add this valuable feature. 
For a start you can do add a `subl_wait` script into your path with the following 

subl_wait
--
#!/bin/sh
subl -w $*

Make sure you have chmod 755 to the new `subl_wait` script and it is inside your path.