From 7c06e906e27578ff6b467f379e4b2e1569193f3d Mon Sep 17 00:00:00 2001 From: James Bunton Date: Thu, 31 Mar 2022 23:28:18 +1100 Subject: [PATCH 1/1] bash: simplify EDITOR for non-emacs systems --- .bashrc | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.bashrc b/.bashrc index 361d97c..784fd13 100644 --- a/.bashrc +++ b/.bashrc @@ -229,6 +229,9 @@ aliasf sudosu 'sudo su -l -s /bin/bash' aliasf python 'PYTHONSTARTUP=~/.pythonrc.py python3' aliasf webshare 'python3 -mhttp.server' +export EDITOR='vim' +aliasf edit "$EDITOR" + if ! command -v pbcopy &> /dev/null; then alias pbcopy='xsel --clipboard --input' alias pbcopym='xsel --input' @@ -265,19 +268,6 @@ function ssh_unsafe { } -################## -# Editor aliases # -################## - -if emacsclient --version &> /dev/null; then - export ALTERNATE_EDITOR='vim' - export EDITOR='emacsclient --tty' -else - export EDITOR='vim' -fi -aliasf edit "$EDITOR" - - ######################### # Optional local config # ######################### -- 2.39.2