henrikpersson / rsub

Use rmate with Sublime Text.
458 stars 70 forks source link

implement fallback editor #47

Closed KES777 closed 8 years ago

KES777 commented 9 years ago

I often work or remotely or direct. And I switch my EDITOR env variable beetween 'rsub' and local editor.

Please implement 'RSUB_FALLBACK_EDITOR' which will contain editor (or command) to run when rsub port is not accessible.

This let just work and do not think about EDITOR env

KES777 commented 8 years ago

This can be done by editing .bashrc

if [ -z "$SSH_CLIENT" ]; then
        export EDITOR="subl"
else
        export EDITOR="rsub --port 52698"
        export RMATE_PORT="52698"
fi