Use nvim as EDITOR if it is installed

main
Buddy Sandidge 2 years ago
parent e8bd1b70cd
commit 10f9c6b91c

@ -1,6 +1,5 @@
#shellcheck disable=SC2034 #shellcheck disable=SC2034
BROWSER=firefox BROWSER=firefox
EDITOR=vim
HISTCONTROL=ignoredups:erasedups:ignorespace HISTCONTROL=ignoredups:erasedups:ignorespace
HISTFILESIZE= HISTFILESIZE=
HISTSIZE= HISTSIZE=

@ -2,6 +2,12 @@
alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z" alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z"
if type nvim >/dev/null 2>/dev/null ; then
export EDITOR=nvim
else
export EDITOR=vim
fi
source_env_file () { source_env_file () {
if [ ! -f "${1}" ]; then if [ ! -f "${1}" ]; then
return return

Loading…
Cancel
Save