From b031ea3ae1a21653ae0cfb945a2c22fab57c27d5 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 28 Sep 2018 12:58:09 +0200 Subject: [PATCH] Vim or Neovim --- zsh/exports.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zsh/exports.zsh b/zsh/exports.zsh index d9c2767..674b86f 100644 --- a/zsh/exports.zsh +++ b/zsh/exports.zsh @@ -1,5 +1,10 @@ # My editor -export EDITOR="vim" +command -v nvim > /dev/null 2>&1 +if [ $? -eq 0 ]; then + export EDITOR="nvim" +else + export EDITOR="vim" +fi # Parallel conpilation with make export MAKEFLAGS="+j`nproc`"