use this file with
export EDITOR="/path/to/subl_wait.sh"
to use subl as system default editor