# AX-ZSH: Alex' Modular ZSH Configuration
# editor_select.zprofile: Setup $EDITOR for the "best" available editor
+if [[ -n "$EDITOR" && ! -x "$EDITOR" && -z "$commands[$EDITOR]" ]]; then
+ # Oops, current $EDITOR seems to be invalid! Start over!
+ unset EDITOR
+fi
+
if [[ -z "$EDITOR" ]]; then
+ # Auto-detect a "good" editor ...
if [[ -n "$DISPLAY" ]]; then
# X11 available, consider X11-based editors, too!
x11_editors="gvim"