From 16f21f07a1aa36b427f4c7489ca56f14bbfa2fc8 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Tue, 20 Apr 2021 12:59:57 -0700 Subject: [PATCH] Always edit files in a new window, and make EDITOR & VISUAL wait --- zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index f530258..ca231be 100755 --- a/zshrc +++ b/zshrc @@ -45,7 +45,10 @@ else fi fi -if command_exists vim; then +if command_exists code; then + export EDITOR="code -nw" + export VISUAL="code -nw" +elif command_exists vim; then export EDITOR="vim" export VISUAL="vim" else @@ -190,7 +193,7 @@ prompt sjs # -------------------------------- alias bgd='bg; disown %1' alias cp='nocorrect cp' # don't correct spelling for 'cp' -alias e='code' +alias e='code -n' alias ez="$EDITOR ~/.zshrc && source ~/.zshrc" alias mkdir='nocorrect mkdir' # don't correct spelling for 'mkdir'