diff --git a/plugin/xlib/vimdot.sh b/plugin/xlib/vimdot.sh index 1ca125954e1671ec4d74a7fa5468c98c6ba54f4a..55fc476d5782bb6322240d636ee30eb827eb4d11 100755 --- a/plugin/xlib/vimdot.sh +++ b/plugin/xlib/vimdot.sh @@ -9,8 +9,7 @@ fi error() { echo "$0: $*" >&2; exit 1; } # Try $EDITOR first, else try vim or vi -editor="$EDITOR" -[ -x "$editor" ] || editor="/usr/bin/vim" +editor="$(which $EDITOR)" || editor="/usr/bin/vim" [ -x "$editor" ] || editor="/usr/bin/vi" [ -x "$editor" ] || error "EDITOR not found or not executable";