# editor-select.plugin.zsh for editor in atom mate subl vim vi; do if [ -n "$commands[$editor]" ]; then EDITOR="$commands[$editor]" break fi done unset editor case "$(basename "$EDITOR")" in "atom"|"mate"|"subl") EDITOR="$EDITOR --wait" ;; esac if [ -n "$EDITOR" ]; then export EDITOR alias zshrc="$EDITOR ~/.zshrc" fi