From: James Bunton Date: Thu, 31 Mar 2022 12:28:18 +0000 (+1100) Subject: bash: simplify EDITOR for non-emacs systems X-Git-Url: https://code.delx.au/dotfiles/commitdiff_plain/7c06e906e27578ff6b467f379e4b2e1569193f3d?hp=e69fb1783f8ae617c45b37d1ad0e9fbc59cdcb10 bash: simplify EDITOR for non-emacs systems --- 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 # #########################