From c73f982aec3e438ea540b2eec6ab0ba829139f9c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 27 Aug 2021 10:38:45 +0100 Subject: Set EDITOR based on DISPLAY --- bashrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 8851b40..776bf8d 100644 --- a/bashrc +++ b/bashrc @@ -194,7 +194,11 @@ export HISTSIZE=${HISTFILESIZE} export HISTCONTROL=ignoredups:ignorespace shopt -s histappend export LESSCHARSET=utf-8 -export EDITOR="gvim -f" +if [[ -n $DISPLAY ]]; then + export EDITOR="gvim -f" +else + export EDITOR="vim" +fi shopt -s cdspell shopt -s checkwinsize shopt -s no_empty_cmd_completion -- cgit v1.2.3