Make nvim default editor if available

This commit is contained in:
ViViDboarder 2022-09-28 11:35:50 -07:00
parent d5faf831b5
commit b10cbb5247
3 changed files with 18 additions and 6 deletions

View File

@ -92,8 +92,12 @@ fi
# Increase memory sizes for java using Ant
export ANT_OPTS="-Xmx2048m -Xms512m"
# Set vim to default editor
# Set vim or nvim to default editor
if type nvim &> /dev/null ; then
export EDITOR=nvim
else
export EDITOR=vim
fi
export VISUAL="$EDITOR"
# Set file as having been loaded to avoid looping

View File

@ -158,8 +158,12 @@ if [ -n "$FZF_DEFAULT_COMMAND" ]; then
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND \$dir"
fi
# Set vim to default editor
# Set vim or nvim to default editor
if type nvim &> /dev/null ; then
export EDITOR=nvim
else
export EDITOR=vim
fi
export VISUAL="$EDITOR"
# vim: set filetype=zsh:

View File

@ -6,8 +6,12 @@ set -gx XDG_CACHE_HOME "$HOME/.cache"
# Increase memory sizes for java using Ant
set -gx ANT_OPTS "-Xmx2048m -Xms512m"
# Set default editor to vim
# Set default editor to vim or nvim
if type -q nvim
set -gx EDITOR nvim
else
set -gx EDITOR vim
end
set -gx VISUAL "$EDITOR"
# Interractive env variables