1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # editor_select.zprofile: Setup $EDITOR for the "best" available editor
4 if [[ -z "$EDITOR" ]]; then
5 if [[ -n "$DISPLAY" ]]; then
6 # X11 available, consider X11-based editors, too!
11 code atom mate subl mvim
15 if [[ -n "$commands[$editor]" ]]; then
16 EDITOR="$commands[$editor]"
20 unset editor x11_editors
24 "code"|"atom"|"mate"|"subl")
25 EDITOR="$EDITOR --wait"
28 EDITOR="$EDITOR --nofork"
32 [[ -n "$EDITOR" ]] && export EDITOR