3 # This code is released in public domain by Han Boetes <han@mijncomputer.nl>
5 # This script tries to exec an editor by trying some known editors if $EDITOR is
8 # Distributions/packagers can enhance this script with a distribution-specific
9 # mechanism to find the preferred editor
11 # Hopefully one of these is installed (no flamewars about preference please!):
12 for editor in "$VISUAL" "$EDITOR" nano nvim vim vi emacs pico qe mg jed gedit mcedit; do
13 if command -v "$editor" > /dev/null 2>&1; then