I generally set both VISUAL
and EDITOR
environment variables to the same thing, but what's the difference? Why would I set them differently? When developing apps, why should I choose to look at VISUAL
before EDITOR
or vice versa?
VISUAL vs. EDITOR – what’s the difference
environment-variablesexvi
Best Answer
The
EDITOR
editor should be able to work without use of "advanced" terminal functionality (like olded
orex
mode ofvi
). It was used on teletype terminals.A
VISUAL
editor could be a full screen editor asvi
oremacs
.E.g. if you invoke an editor through bash (using
C-x C-e
), bash will try firstVISUAL
editor and then, ifVISUAL
fails (because terminal does not support a full-screen editor), it triesEDITOR
.Nowadays, you can leave
EDITOR
unset or set it tovi -e
.