From 4c5371a8c2eb2e1e194a030f9c79e159faf05e3e Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Fri, 4 Apr 2025 17:43:05 +0000 Subject: [PATCH] Add vim option select to shell profile --- sh/.profile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sh/.profile b/sh/.profile index b6d202a..df29a89 100644 --- a/sh/.profile +++ b/sh/.profile @@ -19,8 +19,13 @@ export LANG="en_US.UTF-8" export LC_COLLATE="C" # Export editor preferences. -export EDITOR="vim" -export VISUAL="vim" +if which nvim &> /dev/null; then + export PREFERRED_VIM=nvim +else + export PREFERRED_VIM=vim +fi +export EDITOR="$PREFERRED_VIM" +export VISUAL="$PREFERRED_VIM" # Export browser preferences. export BROWSER="firefox"