diff options
Diffstat (limited to 'sh/profile.d/visual.sh')
-rw-r--r-- | sh/profile.d/visual.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index 95eb1d5d..d03da255 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -1,3 +1,7 @@ -# Set visual editor -VISUAL=vi +# Set visual editor; vim if we've got it, but vi will do fine +if command -v vim >/dev/null 2>&1 ; then + VISUAL=vim +else + VISUAL=vi +fi export VISUAL |