From b2fe9d813047e07d892dbe9c60e12a8d6bbf7779 Mon Sep 17 00:00:00 2001 From: "Deavon M. McCaffery" Date: Wed, 30 Nov 2016 17:46:28 -0800 Subject: [PATCH] feat(editor): use vscode as the default system-wide editor --- src/bashrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bashrc b/src/bashrc index 9b9de2f..aaed255 100644 --- a/src/bashrc +++ b/src/bashrc @@ -39,8 +39,12 @@ alias grep="grep --color=auto" # change ls colors to be more like original unix/linux export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd" -# other system settings -export EDITOR='nano' +if type code 1>/dev/null 2>&1; then + export EDITOR='code --wait' +else + export EDITOR='nano' +fi + export HISTCONTROL=ignoredubs if type brew 1>/dev/null 2>&1; then