]> code.delx.au - dotfiles/commitdiff
bash: simplify EDITOR for non-emacs systems
authorJames Bunton <jbunton@atlassian.com>
Thu, 31 Mar 2022 12:28:18 +0000 (23:28 +1100)
committerJames Bunton <jbunton@atlassian.com>
Thu, 31 Mar 2022 12:28:18 +0000 (23:28 +1100)
.bashrc

diff --git a/.bashrc b/.bashrc
index 361d97ca8e9c308184b9063219e6a93db0733d60..784fd1306983b11f9bc5b0dcba40b334b438f617 100644 (file)
--- 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 #
 #########################