From 8c8436254eded4ed214081b23798b517e88853e0 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Fri, 23 Dec 2022 21:45:53 +0200 Subject: [PATCH] Change $EDITOR to nvim --- config/alias | 3 ++- zshrc | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/alias b/config/alias index 858cf56..773cf35 100644 --- a/config/alias +++ b/config/alias @@ -68,9 +68,10 @@ alias code_scanner='docker run \ alias composerUp='composer global update' alias npmUp='npm -g up' -alias zedit='code ~/.zshrc ~/.alias' +alias zedit='$EDITOR ~/.zshrc ~/.alias' if [[ -f "$HOME/.aliases.local" ]]; then # shellcheck disable=SC1091 source "$HOME/.aliases.local" fi + diff --git a/zshrc b/zshrc index 1dc22be..d72257b 100644 --- a/zshrc +++ b/zshrc @@ -27,6 +27,10 @@ if command -v go &> /dev/null; then fi fi +if command -v nvim &> /dev/null; then + export EDITOR="nvim" +fi + LOCAL_BIN="$HOME/.local/bin" COMPOSER_DIR="$HOME/.composer/vendor/bin" export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"