commit 04bba2425c29b0346f34c7e6b72d6fdcb3e33c9d parent 15f30ab4fdb729b627797f0e97e736cc65d674da Author: Alex Balgavy <alex@balgavy.eu> Date: Wed, 4 Jan 2023 16:56:26 +0100 shell: use neovim as EDITOR if available Diffstat:
M | shell/env | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/shell/env b/shell/env @@ -3,8 +3,9 @@ export DOTFILES="$HOME/.dotfiles" [ -f "$DOTFILES/shell/secret_env" ] && . "$DOTFILES/shell/secret_env" -if [ -n "$VIM_TERMINAL" ]; then EDITOR="vimsend" -elif [ -n "$INSIDE_EMACS" ]; then EDITOR="emacsclient" +if [ -n "$VIM_TERMINAL" ]; then EDITOR=vimsend +elif [ -n "$INSIDE_EMACS" ]; then EDITOR=emacsclient +elif command -v nvim >/dev/null 2>&1; then EDITOR="$(command -v nvim)" else EDITOR="$(command -v vim)"; fi export EDITOR